marcodeltongo / thematic

Automatically exported from code.google.com/p/thematic
0 stars 0 forks source link

Please no hardcoded headers! #55

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Stuff like this creates strange output in the response 404 pages.
http://code.google.com/p/thematic/source/browse/trunk/404.php#1
Output like:

<code>
telnet softwareliber.ro 80
Trying 192.168.0.101...
Connected to main.softwareliber.ro.
Escape character is '^]'.
GET /aa HTTP/1.1
HOST: softwareliber.ro

HTTP/1.1 404 Not found
Date: Thu, 29 Oct 2009 17:50:01 GMT
Server: Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.7 with Suhosin-Patch 
mod_ssl/2.2.8 OpenSSL/0.9.8g
X-Powered-By: PHP/5.2.4-2ubuntu5.7
Set-Cookie: qtrans_cookie_test=qTranslate+Cookie+Test; path=/; 
domain=softwareliber.ro
X-Pingback: http://softwareliber.ro/xmlrpc.php
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Last-Modified: Thu, 29 Oct 2009 17:50:16 GMT
Cache-Control: no-cache, must-revalidate, max-age=0
Pragma: no-cache
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8

<span style="color:red">1ff4</span>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
</code>

Why do we need additional header response? Isn't web server already serving 
the response as a 404?

Original issue reported on code.google.com by cool2sv@gmail.com on 29 Oct 2009 at 5:58

GoogleCodeExporter commented 9 years ago
And google codes markup sucks badly... :-/

Original comment by cool2sv@gmail.com on 29 Oct 2009 at 5:59

GoogleCodeExporter commented 9 years ago
Yep The inclusion of the header function is a throwback to WP 2.0 era before 
headers were properly sent by WP.

See: wp-includes/class-wp.php   handle_404()

fixed in r792

Thanks!

Original comment by eugene.m...@gmail.com on 18 Jan 2012 at 2:21