0

I have Spring MVC + JAXB web service and Flex client. I am getting HTTP 406 error when using RestFUL API. Here is request and response headers on image:

enter image description here

Can you help me for solving this problem?

RRUZ
  • 134,889
  • 20
  • 356
  • 483
talhaocakci
  • 141
  • 1
  • 9

1 Answers1

1

This problem comes when the data returned from the server is not in the format that is excepted by the browser. Also this can be caused by any one of the following:

  • Accept: The MIME types accepted by the browser. For example, HTML files, GIF files etc.
  • Accept-Charset: The character sets accepted by the client, e.g. utf-8, iso-8859-1 etc.
  • Accept-Encoding: The data encoding accepted by the client e.g. the file formats it understands, e.g. gzip.
  • Accept-Language: The natural languages (English, German etc.) accepted by the client.

Check what the server is returning and fix the problem!

Varun Achar
  • 14,781
  • 7
  • 57
  • 74
  • I put the headers. Could you see any weird, unmatched headers? – talhaocakci Dec 07 '11 at 09:21
  • sdch is implemented in Chrome. I don't know about it in other browsers. If the response is encoded in that format then your browser may not be able to decode it or deflate has some compatibility issue. You can check that [here](http://stackoverflow.com/questions/1574168/deflate-compression-browser-compatibility-and-advantages-over-gzip) – Varun Achar Dec 08 '11 at 07:42
  • great. My projects works on IE and Firefox. Then the problem is Chrome I think. Here is another thread: http://stackoverflow.com/questions/4105670/how-to-get-around-content-encoding-gzip-deflate-header-sent-by-chrome – talhaocakci Dec 08 '11 at 13:30