charset encoding mis-matches; i hates 'em!

2010-06-14 @ 16:49#

here's an easy way to get on my nerves; arrange your HTTP server to send the proper charset encoding value in the Content-Type header, but be sure to use a "dumb" payload template that has the wrong charset encoding value.

that way, when i load the payload (and take the time to prepare the proper encoding) it will still fail!

RESPONSE: **************
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-Powered-By: Servlet 2.4
Content-Type: application/xml;charset=ISO-8859-1  <- content match
Content-Length: 11759
Date: Mon, 14 Jun 2010 20:13:17 GMT
Connection: keep-alive

<?xml version="1.0" encoding="UTF-8"?>  <- content mis-match
<rss 
  xmlns:content="http://purl.org/rss/1.0/modules/content/"
  xmlns:dc="http://purl.org/dc/elements/1.1/"     
  version="2.0">   
  ...
  [ISO-8859-1 encoded characters in here]
  ...
</rss>   

seriously, stop being so annoying.

code