[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: https request - the first time



hello scott, hello @ll
it works fine - great!!! thanks for help.

you guess - i have another problem: i translate my response

c                   eval      rc = http_url_post_raw(
c                              'https://' + %trim(W#ip_adresse) + ':'  +
c                                  %trim(W#ip_port)
c                             : %addr(W#request)
c                             : %len(%trim(W#request))
c                             : 1
c                             : %paddr('INCOMING'))
C* convert the data we just received to EBCDIC
c                   if        retlen > 1
c                   callp     http_xlate(retlen: retdata: TO_EBCDIC)
c                   endif

and i get a character '%2B' instead of the expected '+'
what's going wrong?
thx
wolfgang


Hello Wolfgang,

> Is it necessary to make an init before https request?

It used to be required.  It's not required anymore unless you want to
use client certificates or more control over the SSL settings.   Today,
if you omit a call to https_init(), HTTPAPI will call it for you
automatically and will pass *blanks as the parameter.

I will update the comments in EXAMPLE3.

> I give the request in this form:
> callp     http_xlate( %len(W#request)
>                     : W#request
>                     : TO_ASCII   )

You shouldn't call http_xlare().   http_url_post() will automatically
convert your data to ASCII.

The way you're doing it, the data will be run through the EBCDIC->ASCII
translation table twice, resulting in "garbage" data.  Just remove the
call to http_xlate() and call http_url_post()

>
> The result is no feedback - only return code 0 - "CommSSL_Read:
time-out"
>

It looks like HTTPAPI is successfully sending the data to the HTTP
server, but is not getting a response from the HTTP server.  So it sits
and waits until it eventually times out.

It's possible that the http_xlate() is confusing the server and causing
this problem???  I don't know.  See if removing http_xlate() helps.
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------


-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------