Craig Box's journeys, stories and notes...

WordPress header bug: Chunked encoding causes some aggregators to hate you

  • Are people telling you your WordPress site isn't aggregating properly? (Do you check the output, see the RSS is fine, and think they must be mad?
  • Do you check the feed and see a weird 4 bytes on the top of it, and possibly a 0\r\n at the end, but only with wget - not with curl, and not with feedvalidator?
  • Are you running PHP 5.2.1?

If you answered 'yes' to these questions, you have this WordPress HTTP/1.0 causing chunked encoding bug. Thanks to Phil and John for identifying it.

<kinko> write(3, "GET /blog/wp-rss2.php HTTP/1.0\r\nUser-Agent: Wget/1.10.2\r\nAccept: */*\r\nHost:\r\nConnection: Keep-Alive\r\n\r\n", 126) = 126
<kinko> so wget should at least give a warning message that it got an invalid response to a http1.0 request, instead of breaking 🙂
<alastair> I hope you didn't strace wget there, kinko...
<meanphil> strace(or ktrace on fbsd) + tcpdump are the only tools you ever need to debug anything

(Note: fixed in WordPress 2.2.)


2 Responses to “WordPress header bug: Chunked encoding causes some aggregators to hate you”

  1. Brenda says:

    Congrats!! you aggregated to ! 🙂

  2. Craig says:

    Excellent, seems I passed the entry test.

Leave a Reply