Ian,
The code you provided where you say "this is where it is added" is
actually NOT where it is added. That code is only run if the length
of the additional header = 0, therefore, it is code that only runs
when there isn't any additional headers.
The code that runs when there _is_ additional headers is a bit further
down, and looks like the following. I use this additional header
support regularly, as do many other people. It has worked this way
for quite a long time, and has been working well. Can you tell me
what problems you are having with it?
c if %len(wwAddlHdr) > 0
c eval rc = SendReq( peComm
c : %addr(wwAddlHdr)+VARPREF
c : %len(wwAddlHdr)
c : peTimeout )
c if rc < 1
c return rc
c endif
c eval wwReqChain = CRLF
c eval rc = SendReq( peComm
c :
%addr(wwReqChain)+VARPREF
c : %len(wwReqChain)
c : peTimeout )
c if rc < 1
c return rc
c endif
On 6/17/2015 4:55 AM, Ian Patterson wrote:
V5R1
HTTPAPI with SSL, no Expat
We have recently upgraded from 1.20 to 1.29
Communications with the server now does not work correctly and I
think
this is to do with additional HTTP headers.
In our RPGLE program (unchanged through the upgrade) we add data
into
the HTTP header as follows:
.
0275.00 D addl_hdr PR
0276.00 D addl_data 1024A varying
.
0632.00 c callp
http_xproc(HTTP_POINT_ADDL_HEADER:
0633.00 c
%paddr('ADDL_HDR'))
.
2360.00 P addl_hdr
B
2361.00 D addl_hdr
PI
2362.00 D addl_data 1024A
varying
2363.00
2364.00 c if somedata <>
*blanks
2365.00 c eval addl_data = somedata +
x'0d25'
2367.00 c
else
2368.00 c eval addl_data = ''
2369.00 c endif
..
In HTTPAPIR4 v 1.29 this is the code snippet where the additional
header data is added:
0486.00 c eval %len(wwAddlHdr) =
0
0487.00 c if wkAddHdrProc <>
*NULL
0488.00 c callp addl_headers(wwAddlHdr:
wkAddHdrData)
0489.00 c
endif
0490.00
0491.00
*********************************************************
0492.00 * Send request
chain
0493.00
*********************************************************
0494.00 c if %len(wwAddlHdr) =
0
0495.00 c eval wwReqChain = wwReqChain +
CRLF
0496.00 c endif
The additional data is not added to the wwReqChain.
This is the relevant code in v 1.20 that works:
0498.00 c if wkAddHdrProc <>
*NULL
0499.00 c callp addl_headers(wwAddlHdr:
wkAddHdrData)
0500.00 c eval wwReqChain = wwReqChain +
wwAddlHdr
0501.00 c
endif
0502.00
0503.00 c eval wwReqChain = wwReqChain +
CRLF
Regards
Ian Patterson
-----------------------------------------------------------------------
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
-----------------------------------------------------------------------