The Bull Og

Onine since 1994. Offline since 1976.

See also the archive

An individual post follows.

Alright, I've got this web service set up to serve back JSON when a link is clicked. Working in Firefox 1.5+? You bet. IE 6? No. I ping the web service with the browser and what do I get?

Content-Type image/gif is not supported.

Sure enough in Catalyst, I see the following in the logs:

Could not find a serializer for an empty content type

Am I to understand then that the Accept header of the XMLHttpRequest object in IE uses a default of "image/gif"?!?

Sure enough, I made the following change in my REST controller and the JSON service worked:

          serialize => {
              'stash_key' => 'rest',
              'map'       => {
                  'text/xml'           => 'JSON',
                  'text/x-json'        => 'JSON',
                  'image/gif'          => 'JSON',