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

400 Bad Request



   I tried to copy from a working program, but I must have messed up
   somewhere..


   HERE IS THE STRING THAT WORKS, when I try it in a browser:

   [1]http://knapportal-test.knapheide.com/modules/getboss/getusersboss.ph
   p?input_name=gmagnuson




   here is my code:


   http_debug(*ON:'/tmp/http_error_RTNBOSS.txt');


   Form = WEBFORM_open;


   If P1_UsrID <> *blanks ;

     WEBFORM_SetVar(Form: 'input_name': %trim(P1_UsrID) );

   EndIF ;


   WEBFORM_postData( Form : myPointer

   : dataSize );



   rc=http_url_post_raw(

   'http://knapportal-test.knapheide.com/modules' +

   '/getboss/getusersboss.php':

   myPointer: dataSize :

   1: %paddr('INCOMING')

   :HTTP_TIMEOUT

   :HTTP_USERAGENT

   : 'application/x-www-form-urlencoded' );


   if rc <> 1;

            *** rc comes back as 400...


   Here is data from the error log:

   HTTPAPI Ver 1.23 released
   2008-04-24

   OS/400 Ver
   V7R1M0



   New iconv() objects set, PostRem=819. PostLoc=0. ProtRem=819.
   ProtLoc=0

   http_persist_open():
   entered

   http_long_ParseURL(): entered

   DNS resolver retrans:
   4

   DNS resolver retry  :
   4

   DNS resolver options:
   x'00000136'

   DNS default domain:
   knapheide.com

   DNS server found:
   192.168.100.236

   DNS server found:
   192.168.100.233

   http_persist_post():
   entered

   http_long_ParseURL(): entered

   do_post():
   entered

   POST /modules/getboss/getusersboss.php
   HTTP/1.1

   Host:
   knapportal-test.knapheide.com

   User-Agent:   http-api/1.24

   Content-Type:   application/x-www-form-urlencoded

   Expect:
   100-continue

   Content-Length:
   20





   recvresp(): entered

   HTTP/1.1 400 Bad
   Request

   Content-Type: text/html;
   charset=us-ascii

   Server:
   Microsoft-HTTPAPI/2.0

   Date: Mon, 11 Mar 2013 14:37:36
   GMT

   Connection:
   close

   Content-Length:
   311





   SetError() #13: HTTP/1.1 400 Bad
   Request

   recvdoc parms: identity 311

   header_load_cookies()
   entered

   recvdoc():
   entered

   SetError() #0:

   <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML
   4.01//EN""http://www.w3.org/TR/html4/strict.dtd";>

   <HTML><HEAD><TITLE>Bad
   Request</TITLE>

   <META HTTP-EQUIV="Content-Type" Content="text/html;
   charset=us-ascii"></HEAD>

   <BODY><h2>Bad
   Request</h2>

   <hr><p>HTTP Error 400. The request is badly
   formed.</p>

   </BODY></HTML>



   SetError() #13: HTTP/1.1 400 Bad
   Request

   http_close():
   entered

References

   1. http://knapportal-test.knapheide.com/modules/getboss/getusersboss.php?input_name=gmagnuson
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------