Cody Pendant has asked for the wisdom of the Perl Monks concerning the following question:
I was just working on a page-size checking script.
I fetched images with LWP::UserAgent, and added one sensible check, whether the response was a success or not. Otherwise images not fetched properly, due to my code or the code of the page being incorrect, would report their size as the size of the 404 message.
However, the if($response->is_success) test was passed, even when the image wasn't there.
So I looked at the $response->status_line and it was 202, which when I looked it up, turned out to be an ambiguous, non-committal HTTP response.
If I tried to get the images with a regular browser, I see a 404, but when trying to fetch them with LWP::UserAgent, I'm getting 202?
I put a check in my code that the response is "200 OK" for the time being, but what's going on? Any ideas?
($_='kkvvttuubbooppuuiiffssqqffssmmiibbddllffss')
=~y~b-v~a-z~s; print
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Non-commital HTTP Response?
by PodMaster (Abbot) on Jun 07, 2004 at 11:56 UTC | |
|
Re: Non-commital HTTP Response?
by iburrell (Chaplain) on Jun 07, 2004 at 16:04 UTC | |
|
Re: Non-commital HTTP Response?
by hossman (Prior) on Jun 07, 2004 at 21:12 UTC | |
by Cody Pendant (Prior) on Jun 07, 2004 at 22:56 UTC | |
|
Re: Non-commital HTTP Response?
by Cody Pendant (Prior) on Jun 09, 2004 at 00:14 UTC |