commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc.Saeges...@apropos.com
Subject RE: Why are HTTP POST headers split into multiple packets?
Date Wed, 01 May 2002 14:51:47 GMT
The fact that headers are sent in different packets makes absolutely *no*
difference at the application layer (e.g. HttpClient and the Web server).
At the application level, TCP is simply a stream of bytes.  The protocol
handles packing and unpacking these bytes into packets as it sees
appropriate.

There may be some *really small* performance penalty with them split across
different packets, but you won't notice it unless you are doing some really
serious throughput.  At some point I'll looking into better buffering, but
right now its an enhancement request.

The real problem here is the EBay is doing some seriously strange things and
I can't explain it right now.  This issue has been reported previously (a
couple days ago, I think, check the archives).  EBay seems to be sending
multiple responses, with separate HTTP/1.1 200 OK headers and *different*
content, for single request.  I've captured this behavior between EBay and
IE using Ethereal so it isn't HttpClient causing EBay's goofiness, but IE
seems to handle it better than HttpClient.  When I get some time I'll
investigate further.

One of the next questions that usually comes with when people start peeking
under the covers with packet analyzers, is "How come I see a FIN before I
see my data?" or other questions related to things not showing up in the
expected order.  The answer is that that the Internet is a pretty wild and
uncertain place and packets will get re-ordered, lost, duplicated, resent
and otherwise mangled during their lifetimes.  The TCP protocol takes care
of all these things and delivers a reliable byte stream to the application.
That's all most people will ever need to care about.  HttpClient logs
everything it reads off the wire (including the multiple 200 responses from
EBay) and unless you want to go blind (and bald from pulling your hair out)
following TCP sequence numbers and ACKs, that wire level log is about all
you'll ever want to look at.

Marc "I spend *way* to much time in Ethereal" Saegesser 

> -----Original Message-----
> From: Rick Horowitz [mailto:rickhoro@yahoo.com]
> Sent: Tuesday, April 30, 2002 8:09 PM
> To: commons-dev@jakarta.apache.org
> Subject: Why are HTTP POST headers split into multiple packets?
> 
> 
> When I run my HttpClient application through ethereal
> (on linux) I discovered that my POST request to EBay
> is sent as 3 IP packets with 77, 169, and 669 bytes,
> respectively.
> 
> I'm working on an application that requires that I
> login to EBay, and cannot get EBay to accept my login
> request...keep getting a generic error message back
> with no real information from EBay. 
> 
> Anyway, I'm wondering whether sending multiple IP
> packets could possibly be causing EBay to reject the
> login request, and also wondering why Java sends
> multiple IP packets...I don't see anything in the
> HttpClient code that would cause this as far as I can
> tell.
> 
> Does anyone have any ideas on this subject? Please let
> me know. I'll be happy to provide some code or traces
> if anyone needs to see what I'm seeing.
> 
> Thanks very much,
> 
> Rick
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Health - your guide to health and wellness
> http://health.yahoo.com
> 
> --
> To unsubscribe, e-mail:   
> <mailto:commons-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:commons-dev-help@jakarta.apache.org>
> 

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message