Discussion:
CURL: How to detect 404 Error when it is no reported by HTTP
(too old to reply)
Pierre Thorel
2004-08-04 06:49:59 UTC
Permalink
Hello

When I try to download a file which address is not correct on some
servers, like "chez.tiscali.fr", it sends back a perso HTML page to report
the 404 error instead of reporting it in the HTTP header.

Does somebody know an easy way to detect that ? I tryed to set
CURLOPT_FAILONERROR option, but it does the same.

Thanks for any answer.
Pierre Thorel
Måns Rullgård
2004-08-04 07:43:17 UTC
Permalink
Post by Pierre Thorel
Hello
When I try to download a file which address is not correct on some
servers, like "chez.tiscali.fr", it sends back a perso HTML page to report
the 404 error instead of reporting it in the HTTP header.
Send emails repeatedly to the webmaster until he fixes the headers.
Any sane web server will have an option to send a custom page with the
error codes.
--
Måns Rullgård
***@kth.se
Chris McDonald
2004-08-04 07:45:10 UTC
Permalink
Post by Pierre Thorel
When I try to download a file which address is not correct on some
servers, like "chez.tiscali.fr", it sends back a perso HTML page to report
the 404 error instead of reporting it in the HTTP header.
Isn't it up to the server, not you, to decide if the request results
in a 404 error? If the *server's* interpretation of a URL that *you*
think is incorrect, results in a 200, then it's a 200.

_______________________________________________________________________________
Dr Chris McDonald E: ***@csse.uwa.edu.au
Computer Science & Software Engineering W: http://www.csse.uwa.edu.au/~chris
The University of Western Australia, M002 T: +618 6488 2533
Crawley, Western Australia, 6009 F: +618 6488 1089
Måns Rullgård
2004-08-04 09:22:14 UTC
Permalink
Post by Chris McDonald
Post by Pierre Thorel
When I try to download a file which address is not correct on some
servers, like "chez.tiscali.fr", it sends back a perso HTML page to report
the 404 error instead of reporting it in the HTTP header.
Isn't it up to the server, not you, to decide if the request results
in a 404 error? If the *server's* interpretation of a URL that *you*
think is incorrect, results in a 200, then it's a 200.
The problem is that the server mentioned sends a page stating that the
requested page does not exist (the file name is "erreur404.asp"),
without setting the HTTP status code to 404. The server is broken,
and there isn't much the client can do.
--
Måns Rullgård
***@kth.se
Pierre Thorel
2004-08-04 09:51:34 UTC
Permalink
I just had an answer from tiscali's tech support: They say their server is
bugged and they are trying to solve the problem, so the problem came from
them.

Thank you for your answers.
Pierre Thorel

Loading...