Java console “Content-Encoding: null” message on loading applet
March 26th, 2011 | by Sean |I thought at first glance this might be an error in an website I’m working on, so looked into it a little bit further – turns out it’s nothing at all.
I turned on request debugging in Spinneret and could see that the Sun Java plugin in FireFox was sending the request header:
accept-encoding: pack200-gzip, gzip
… so perhaps it felt obliged to point out that there was no Content-Encoding specified in the response. I don’t set a Content-Encoding header for the response, as it’s not encoded. As far as I can see there’s no need to encode the response I’m sending – it’s a jar file, so it’s already in Zip format – compressing it again would probably make it bigger. I can’t help thinking though that the message shouldn’t be there at all if unencoded responses (identity encoding) really are OK.
It’s nice to see that the Java developers have taken the Header Field spec at face value and are sending all lower-case field names in requests from the plugin. I wonder if that ever catches out anybody who expects Initial-case or Camel-Case header field names?