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

Re: [Ftpapi] Antwort: Re: Antwort: Re: HTTP/1.1 411 Length Required with httpapi v 1.32



Hello,

I have not had time to try this, but I think the problem is in the HTTPAPIR4 member, around line 370. This is the code:

     c                   if        pePostDataLen > 0 and
     c                             (pePostData<>*null or pePostProc<>*null)
     c                   eval      wwSendReqBody = *on
     c                   endif

The purpose behind this is to make a distinction between HTTP requests that send a request body (such as POST and PUT) and those that do not (such as GET, DELETE, PROPFIND, etc). Currently if you pass a length of 0, it assumes that you must be running a method that does not require a request body, and therefore it doesn't put the length of the request body into the headers.

I don't have time to test it, but simply allowing wwSendReqbody to be set *ON when pePostDataLen=0 should solve the problem.

c                   if        pePostDataLen >= 0 and
c                             (pePostData<>*null or pePostProc<>*null)
c                   eval      wwSendReqBody = *on
c                   endif

The problem is, to know if this is right, I need to test all possible situations (not only your POST request), and I don't have time to do that right now. You can try it if you like, but you'll probably only try your own request, rather than everything...

-SK


On 2/10/2017 6:33 AM, Karl-Friedrich Goergen wrote:
Hello Scott,

thanks for your support.

If you could give us a tip what we should change in HTTPAPI we could give it a try and test the fix.

Regards
Karl Friedrich






------------------------------------------------------------------------
*Karl-Friedrich Goergen
*Leiter System i Buchung und BO

L'TUR  Tourismus AG
------------------------------------------------------------------------
Augustaplatz 8
76530 Baden-Baden
Tel. +49 7221 366 116
Fax  +49 7221 366 88 116
www.ltur.com <http://www.ltur.com/de/> <http://www.ltur.com/de/last-minute/urlaub/mandelbluete?omnin=DE-HP-FLUID-MB>
------------------------------------------------------------------------

*L'TUR Tourismus AG*- Europe's No. 1 for Last-Minute-Travel with 150 shops in six European countries L'TUR Tourismus AG, Augustaplatz 8, 76530 Baden-Baden, Vorsitzender des Aufsichtsrats: Sebastian Ebel
Vorstand: Marek Andryszak (Vorsitzender des Vorstandes), Benjamin Jacobi
Registergericht: Amtsgericht Mannheim HRB 201600


Von: Scott Klement <sk@xxxxxxxxxxxxxxxx>
An: FTPAPI/HTTPAPI mailing list <ftpapi@xxxxxxxxxxxxxxxxxxxxxx>
Datum: 09.02.2017 23:50
Betreff: Re: [Ftpapi] Antwort: Re: HTTP/1.1 411 Length Required with httpapi v 1.32
Gesendet von: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
------------------------------------------------------------------------



Hello,

This is a bug in HTTPAPI that was introduced when version 1.24 was
released.   You said that you are running 1.24beta11, which is a beta
version that was not the final release of 1.24.  This bug was created
after that beta version.

There isn't anything you can change in your call that will fix it. It
must be fixed inside HTTPAPI.

I will try to find time to fix it as soon as possible.

-SK


On 2/3/2017 4:17 AM, Karl-Friedrich Goergen wrote:
> Hello Scott,
>
> this is the call of http_url_post
>
>
>   ReturnCode = http_url_post(%trim(xml_URL)   :
>                  %addr(P_PostData) + 2  :
>                  %len(P_PostData)       :
>                  ResFile              :
>                  cTimeOut               :
>                  HTTP_USERAGENT         :
>                  cCharset               :
>                  SOAP_Action            );
>
>
> Should we adjust this for Ver 1.32 ?
>
> Thank you for your support.
>
> Regards
> Karl Friedrich
>
>
>

_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi




_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi

_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi