Skip to content

Be liberal in your HTTP Accept…

Published on: January 12, 2007    Categories: Meta, Misc, Web standards

Ever since I started using Joe Gregorio’s mimeparse module to help with my OpenID delegation, I’ve been treated to a first-hand tour of the various things people have thought it would be good to stuff into the HTTP Accept headers their applications send. So, naturally, I’m going to start a gallery of some of my favorites.

So far the winner in the “is that really what you meant” category is what appears to be the default header sent by Java’s HTTP connection classes:

text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2

I knew Java had aspirations of glory, but apparently it thinks it can handle, well, anything. No, really, they mean anything, and they’re so emphatic they decided to say it twice. I get emails four or five times a day now from exceptions mimeparse raises when it finds that bare asterisk.

And my award for “it’s nice that you documented it, but this really isn’t the time or the place” goes to an instance of FAST Crawler which is apparently running on someone’s phone and trying to fetch my home page several times a day. Its Accept header reads:

PS! declaring, application/xhtml+xml, as second entry activates the xhtml validation module, application/xhtml+xml, application/vnd.wap.xhtml+xml

That one’s going to be a source of amusement for a long, long time.