[TYPO3] HEAD returns 200 instead of 404

Dennis Cheung hkdennis2k at gmail.com
Thu Jul 20 08:07:39 CEST 2006


"Status: 404 Not Found" is a CGI style command header, CGI engines will
handle this and send "HTTP/1.1 404 Not Found".

But, if you are using "mod_php" in apache, it may not handle that, and let
it send to client side.

You can try remove the mod_php and using CGI or FastCGI. You can see the
different.

Dennis



On 7/20/06, Ricardo Scachetti Pereira <ricardo at tdwg.org> wrote:
>
>     Hi all,
>
>     I am also using 3.8.1 and am experiencing the same problem. See below:
>
> >telnet myserver.tld 80
> Trying (my server ip)...
> Connected to myserver.tld.
> Escape character is '^]'.
> HEAD /fjsdklfj HTTP/1.1
> Host: myserver.tld
>
> HTTP/1.1 200 OK
> Date: Thu, 20 Jul 2006 03:38:20 GMT
> Server: Apache/2.0.52 (Red Hat)
> X-Powered-By: PHP/4.3.9
> Set-Cookie: fe_typo_user=c674955e74; path=/
> Status: 404 Not Found
> Connection: close
> Content-Type: text/html; charset=UTF-8
>
> Connection closed by foreign host.
>
>     The negative side-effect I get from this is that tripwire reports a
> bunch of false positives, i.e., it thinks that many unsuccessful probes
> to our website have been actually successful (because of the 200 Ok code).
>
>     But from my test Typo3 setup on my workstation (win box), I get the
> right result:
>
> >telnet localhost 80
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> HEAD /sdkfjldk HTTP/1.1
> Host: localhost
>
> HTTP/1.1 404 Not Found
> Date: Thu, 20 Jul 2006 03:43:09 GMT
> Server: Apache/2.0.54 (Win32) mod_ssl/2.0.54 OpenSSL/0.9.8a PHP/4.4.1
> Content-Type: text/html; charset=iso-8859-1
>
>     Does anyone know where we should look in the code to find this "bug"?
>
>     Thanks,
>
> Ricardo
>
> Martin Kutschker wrote:
> > Dmitry Dulepov schrieb:
> >
> >> Hi!
> >>
> >> Peter Raykov wrote:
> >>
> >>
> >>> How to get correct the HEAD responds?
> >>>
> >> No idea because it requires debugging to answer. But you can either
> >> write a bug report at bugs.typo3.org or try to fix it and post patch to
> >> the bug tracker. Than it can come to official release.
> >>
> >
> > It's interesting. I'm surprised if TYPO3 handles different HTTP request
> > differently. Perhaps it's a web server issue.
> >
> > Masi
> > _______________________________________________
> > TYPO3-english mailing list
> > TYPO3-english at lists.netfielders.de
> > http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
> >
> >
>
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>



-- 
----
Dennis



More information about the TYPO3-english mailing list