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

HTTP 200 return code



   Hi,



   We have a trading partner that has special processing if a response
   from them will be greater than 32K.  The first 7 bytes of a response
   is the number of bytes returned in the response, no inclusive of the
   7-byte counter.  If a response is greater than 32K, it is sent in 32K
   pieces.  Using debug, it seems that return code 100 is returned for
   all but the last section, which has return code 200.



   Unfortunately, there is very limited test data available.  I have two
   requests I can make - one that returns 50,812 bytes and one that
   returns 106,344.  The first one works fine - the last section returns
   a code 200 and the entire response is written to the IFS file.  The
   second one only writes 95,263 of the 106,344 bytes to the IFS file.



   It appears that the process works if there are two pieces to the
   response, but not if there is four.  However, 95,263 is not exactly
   32K three times, either.  I followed the debug through until the field
   rc had a value of 200, then it returned and RecvDoc was called which
   created the IFS file with the truncated response.



   I attached two debug files.  http_debug_good.txt is the for the
   successful response and http_debug_bad.txt is the unsuccessful one.  I
   removed some information to maintain confidentiality with our trading
   partner.  Lines I changed are marked with "*** " and " ***" before and
   after.



   Any suggestions would be quite welcome.



   Thanks,



   Barry Shrum
HTTPAPI Ver 1.21pre5 released 2007-08-29

New iconv() objects set, PostRem=819. PostLoc=0. ProtRem=819. ProtLoc=0
http_setauth(): entered
http_url_post_stmf(): entered
getting post file size...
opening file to be sent...
opening file to be received
http_persist_open(): entered
http_long_ParseURL(): entered
https_init(): entered
-------------------------------------------------------------------------------------
Dump of local-side certificate information:
-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
Dump of server-side certificate information:
-------------------------------------------------------------------------------------
Cert Validation Code = 0

*** Certificate information looks good  ***

Protocol Used: TLS Version 1
http_persist_post(): entered
http_long_ParseURL(): entered
do_post(): entered
POST /servlet/stspost? HTTP/1.1
Host: *** abc.xyz.com ***
User-Agent: http-api/1.11
Content-Type: application/x-www-form-urlencoded
Expect: 100-continue
Content-Length: 527
Authorization: Basic *** .... ***


recvresp(): entered
HTTP/1.1 100 Continue


SetError() #13: HTTP/1.1 100 Continue
sendraw(): entered
service_name=*** some service name ***
recvresp(): entered
HTTP/1.1 200 OK
Server: Sun-ONE-Web-Server/6.1
Date: Sat, 01 Dec 2007 00:01:09 GMT
Content-length: 95270
Content-type: text/plain
X-powered-by: Servlet/2.4
Set-cookie: JSESSIONIDSSO=70EDB91D8AF5181F7C7C1C61FF04BDC4; Path=/
Set-cookie: JROUTE=6ye9; Path=/


SetError() #13: HTTP/1.1 200 OK
recvdoc parms: identity 95270
header_load_cookies() entered
cookie_parse() entered
cookie =  JSESSIONIDSSO=70EDB91D8AF5181F7C7C1C61FF04BDC4; Path=/
cookie attr jsessionidsso=70EDB91D8AF5181F7C7C1C61FF04BDC4
cookie attr path=/
cookie_parse() entered
cookie =  JROUTE=6ye9; Path=/
cookie attr jroute=6ye9
cookie attr path=/
recvdoc(): entered
SetError() #0:
0106344 *** only 95,263 bytes instead of 106,344 ***
http_close(): entered
HTTPAPI Ver 1.21pre5 released 2007-08-29

New iconv() objects set, PostRem=819. PostLoc=0. ProtRem=819. ProtLoc=0
http_setauth(): entered
http_url_post_stmf(): entered
getting post file size...
opening file to be sent...
opening file to be received
http_persist_open(): entered
http_long_ParseURL(): entered
https_init(): entered
-------------------------------------------------------------------------------------
Dump of local-side certificate information:
-------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------
Dump of server-side certificate information:
-------------------------------------------------------------------------------------
Cert Validation Code = 0

*** Certificate information looks good  ***

Protocol Used: TLS Version 1
http_persist_post(): entered
http_long_ParseURL(): entered
do_post(): entered
POST /servlet/stspost? HTTP/1.1
Host: *** abc.xyz.com ***
User-Agent: http-api/1.11
Content-Type: application/x-www-form-urlencoded
Expect: 100-continue
Content-Length: 527
Authorization: Basic *** .... ***


recvresp(): entered
HTTP/1.1 100 Continue


SetError() #13: HTTP/1.1 100 Continue
sendraw(): entered
service_name=*** some service ***
recvresp(): entered
HTTP/1.1 200 OK
Server: Sun-ONE-Web-Server/6.1
Date: Fri, 30 Nov 2007 23:13:41 GMT
Content-length: 50819
Content-type: text/plain
X-powered-by: Servlet/2.4
Set-cookie: JSESSIONIDSSO=FF86786AE79BACF15E39E37C9C44F0E6; Path=/
Set-cookie: JROUTE=qRbR; Path=/


SetError() #13: HTTP/1.1 200 OK
recvdoc parms: identity 50819
header_load_cookies() entered
cookie_parse() entered
cookie =  JSESSIONIDSSO=FF86786AE79BACF15E39E37C9C44F0E6; Path=/
cookie attr jsessionidsso=FF86786AE79BACF15E39E37C9C44F0E6
cookie attr path=/
cookie_parse() entered
cookie =  JROUTE=qRbR; Path=/
cookie attr jroute=qRbR
cookie attr path=/
recvdoc(): entered
SetError() #0:
0050812*** 50812 bytes of data ***
http_close(): entered
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------