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

Posts Tagged ‘wordpress’

Happy birthday

Wednesday, May 16th, 2007

Off The Record (ok, the name sucks) is 1 year old today.  Wow.

How did I find this out? Someone randomly suggested it might be Prof Eric's birthday today, and I mentioned it last year.  (On a different date however).  Pretty cool co-incidence though.

How did I confirm it? I was asked to enter my username and password to post this,  so I guess WordPress cookies have a 1 year lifetime.

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

Friday, April 27th, 2007
  • 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.)

Asshat space (or wordpress c2 a0, for search-fu)

Sunday, June 18th, 2006

Somehow, WordPress is inserting C2 A0 characters in my feed, which means that Planet NZTech can't parse them, so my posts don't show up until I find them manually and fix them.

C2 A0 is a unicode non-breaking space. It could be because of my habit of hitting Space twice after a sentence, that it realiases one of them has to be non-breaking. Whatever it is, it's irritating.

It doesn't happen in the output under ISO-8859-1. It's only on Windows, doing a diff of the feed as downloaded on my UTF-8 Linux server, that I actually see the problem.

Badly configured UTF-8 systems often end up with the symbol A-with-circumflex (Â) before the character. In #wlug, we lovingly call this character "the asshat". I had thought that putting it in would stop this post from being picked up, but seems there's an â in HTML just for my asshat character.

I've also found I can see them with LANG=iso-8859-1 less index.html. This explains why I couldn't find them to start with - less runs in UTF-8 by default, which draws it as a space!

Unfortunately, it works fine on Planet WLUG, so it's fixed in newer planetplanet, which doesn't work for Follower at the moment ?

Not much can really be fixed at this point, so this writeup can act as a "this is the problem" in case anyone Googles for "wordpress c2 a0".