Hi,

We're running googleanalytics on a Pressflow 6 installation. One of the changes Pressflow makes is to drupal_set_header(), to make sure that Drupal responds with the correct HTTP version for what it was requested on (HTTP/1.0 or HTTP/1.1). Unfortunately googleanalytics searches explicitly in the headers for "HTTP/1.1 404 Not Found", but Pressflow actually stores this as ":status: 404 Not Found", so it doesn't match.

I've patched the module to simply ignore the HTTP/1.1 bit and just match on the "404 Not Found" part, which works.

I don't imagine it has any adverse effects on stock Drupal.

Thanks

CommentFileSizeAuthor
googleanalytics.module.pressflow.patch1.21 KBneilnz
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hass’s picture

Category: bug » feature

Sounds like a bug in pressflow! Do you know why pressflow change the headers and why it adds the ":status:"?

neilnz’s picture

As mentioned, it does it so that it's not fixed to writing "HTTP/1.1" as the HTTP version. Because Pressflow is designed to work well behind caching proxies like Nginx or Varnish, which usually make requests over HTTP/1.0, it needs to reply with an "HTTP/1.0" header to those, so instead of calculating which version to use when the header is set, it substitutes in the correct version when it writes the headers out, using a ":status:" placeholder in between.

Since we use nginx as a proxy in front of Apache, the actual error that Pressflow outputs is "HTTP/1.0 404 Not Found".

hass’s picture

Status: Needs review » Needs work

Patch does not apply.

hass’s picture

Status: Needs work » Fixed

Committed to D5 and D6. There is no need to port to D7+.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.