| Author |
Message |
þó¡ÿ-Þõ!ý m@ñ *nix forums Guru Wannabe
Joined: 04 Apr 2005
Posts: 107
|
Posted: Thu Jul 20, 2006 1:14 am Post subject:
Re: socket call does not read full content
|
|
|
Spoon wrote:
| Quote: | Davide DG wrote:
I'd suggest using a packet sniffer (eg: ethereal).
Ethereal is dead
|
I use ethereal, therefore I am dead?
Hey, wait a minute!
poly-p man |
|
| Back to top |
|
 |
Mike T. *nix forums Guru Wannabe
Joined: 20 Feb 2005
Posts: 245
|
Posted: Wed Jul 19, 2006 7:55 pm Post subject:
Re: socket call does not read full content
|
|
|
Davide DG wrote:
| Quote: | I'd suggest using a packet sniffer (eg: ethereal).
|
Ethereal is dead  |
|
| Back to top |
|
 |
Davide DG *nix forums beginner
Joined: 27 Jun 2005
Posts: 4
|
Posted: Tue Jul 18, 2006 6:57 pm Post subject:
Re: socket call does not read full content
|
|
|
jainarunk@gmail.com ha scritto:
| Quote: | I am making several calls, till I count all bytes and total is equal to
Content-Length.
However after reading some 21 bytes less, the client does not have
anything to read
although expecting 21 more bytes and thus the client goes in an
infinite loop.
|
I'd suggest using a packet sniffer (eg: ethereal).
bye.
--
Davide DG.
tieni per te la spam per rispondermi via email. |
|
| Back to top |
|
 |
jainarunk@gmail.com *nix forums beginner
Joined: 10 May 2006
Posts: 18
|
Posted: Tue Jul 18, 2006 4:09 pm Post subject:
Re: socket call does not read full content
|
|
|
Allen McIntosh wrote:
| Quote: | jainarunk@gmail.com wrote:
I am implementing a http client and reading the content from the
socket. For MIME type
text/html the socket reads the full Content-Length bytes,
You were lucky. You will get however many bytes are available at the
time of the read. If the content is split over several frames, you may
not get everything in a single call.
|
Allen,
I am making several calls, till I count all bytes and total is equal to
Content-Length.
However after reading some 21 bytes less, the client does not have
anything to read
although expecting 21 more bytes and thus the client goes in an
infinite loop.
nagrik |
|
| Back to top |
|
 |
Allen McIntosh *nix forums Guru Wannabe
Joined: 22 Mar 2005
Posts: 160
|
Posted: Tue Jul 18, 2006 3:37 pm Post subject:
Re: socket call does not read full content
|
|
|
jainarunk@gmail.com wrote:
| Quote: | I am implementing a http client and reading the content from the
socket. For MIME type
text/html the socket reads the full Content-Length bytes,
|
You were lucky. You will get however many bytes are available at the
time of the read. If the content is split over several frames, you may
not get everything in a single call. |
|
| Back to top |
|
 |
jainarunk@gmail.com *nix forums beginner
Joined: 10 May 2006
Posts: 18
|
Posted: Tue Jul 18, 2006 3:27 pm Post subject:
socket call does not read full content
|
|
|
Hello Group,
I am implementing a http client and reading the content from the
socket. For MIME type
text/html the socket reads the full Content-Length bytes, however if
the MIME type is
audio/mpeg the socket does not read the whole Content-Length and only
reads some number
of less bytes from the web server.
It causes my program to go in an infinite loop, because I close the
socket when I read full
Content-Length.
Could someone tell me what could be causing this. I tried to debug it
in many ways but
could not come up with a reason.
Need help in figuring out the cause.
Thanks in advance.
nagrik |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|