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

HTTPAPI possible bug v 1.29 with additional HTTP headers



   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
-----------------------------------------------------------------------