I tried your suggestion (ie. using a block and putting it to a file: see
copy below) but it still cuts the page short just as before. The actual web
page is ~58K but I’m only getting ~51K. Any more suggestions?
Yes the server completes the document. Browser serves it nicely, and I also
verified via wget, which give the complete copy. I still don’t know why
Net::http prematurely cuts off the document.
“Meihua Liang” mliang@cox.net schrieb im Newsbeitrag
news:YXuSb.11834$fZ6.7987@lakeread06…
I tried your suggestion (ie. using a block and putting it to a file:
see
copy below) but it still cuts the page short just as before. The actual
web
page is ~58K but I’m only getting ~51K. Any more suggestions?
Did you verify with wget that the server actually serves the complete
document? If not, that’s what I’d do.
“Meihua Liang” mliang@cox.net schrieb im Newsbeitrag
news:YXuSb.11834$fZ6.7987@lakeread06…
I tried your suggestion (ie. using a block and putting it to a file:
see
copy below) but it still cuts the page short just as before. The actual
web
page is ~58K but I’m only getting ~51K. Any more suggestions?
Did you verify with wget that the server actually serves the complete
document? If not, that’s what I’d do.
Yes the server completes the document. Browser serves it nicely, and I
also verified via wget, which give the complete copy. I still don’t know
why Net::http prematurely cuts off the document.
I played around with your script a bit, and noticed something strange: When
trying to fetch the file via telnet, it is also cut off early. However, as
you said, wget correctly retrieves the whole document. Why? wget sends a
user-agent header field, and only in this case the whole document is
served. So, by adding a user-agent header field to your request, it works
for me (with Ruby 1.8):