[wp-hackers] WordPress + Squid?

Jacob Santos dragonwing at dragonu.net
Wed Sep 12 05:38:18 GMT 2007


Hmm, my guess from what WordPress does internally is header('HTTP/1.1 
304 Not Modified', true);

As for sending 'Content-Type: text/html' before HTTP/1.1, is a violation 
of HTTP protocol. The HTTP/1.1 is the response header and must be first.

Basically, my guess is that you aren't overriding the first line which 
might be HTTP/11. 200 Success or something.

Jacob Santos

Viper007Bond wrote:
> My web admin buddy who helps me run the server all my WordPress sites are
> has set up Squid due to the traffic one of my sites gets (no, not my
> personal blog sadly). I already run WP-Cache on it, but during peak times,
> the server bogs down and becomes a tad slow.
>
> However, he says WordPress (well, more likely WP-Cache) isn't sending a 304
> header when the page hasn't been modified. Is all I need to do to fix this
> is send a 304 via header() right before this line in wp-cache-phase-1.php ?
>
> if ($meta->dynamic) {
>
> i.e. this:
>
> header( 'HTTP/1.1 304 Not Modified' );
> if ($meta->dynamic) {
>
>
> Anyone knowledgeable care to weigh in?
>
> I'm running WP 2.2.3 on this particular install.
>
>   


More information about the wp-hackers mailing list