Page 1 of 1
fetch error
Posted: Wed May 09, 2001 5:40 pm
by sourceuno
I'm using the fetch function to retrieve data from a site. I get the following error message:
Error fetching
http://www.mysite.com/mypage: Reply size 17447 != Content-Length 17443 (truncated) for
http://www.mysite.com/mypage
What's causing this error to occur?
fetch error
Posted: Wed May 09, 2001 6:10 pm
by mark
The webserver said it was going to return 17443 bytes for the given page. But it returned 17447 bytes. <fetch> truncated the page to the value given by the webserver's "Content-Length" header.
fetch error
Posted: Wed May 09, 2001 10:13 pm
by sourceuno
Why does <fetch> truncate the page? Is there any way that I can fetch this page without an error?
fetch error
Posted: Wed May 09, 2001 10:28 pm
by bart
Fetch didn't truncate the page. The webserver did it by not doing its math correctly.
Look at the last 4 bytes of the page in question to see if they're real.
fetch error
Posted: Thu May 10, 2001 11:16 am
by sourceuno
How can I tell if the last 4 bytes are real? Does this mean that I will not be able to fetch this page because the webserver is returning the wrong header information? I am able to view this page through my browser. Here's the link:
http://pub44.ezboard.com/bcamaroclubkansascity
fetch error
Posted: Thu May 10, 2001 11:53 am
by Kai
You could telnet to the web server port and do a manual GET, or use geturl (a util program included with Texis, in the bin directory; usage: geturl
http://somesite/) to fetch the page, and examine the last 4 bytes. In this case, it's a double newline, which won't affect the formatted text.
However, in cases like this, there's no way to know if the web server is adding extraneous data to the page, or not computing the page size correctly, so the extra data may or may not be valid. <fetch> still returns the page, it's just warning that the data may be truncated because the returned information was inconsistent.