宁静的web服务HTTP 406错误 [英] http 406 error on restful web service
本文介绍了宁静的web服务HTTP 406错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你能帮我解决这个问题吗?
解决方案
当服务器返回的数据不是浏览器所不允许的格式时,会出现这个问题。这也可能是由以下任何一种情况引起的:
- 接受:浏览器接受的MIME类型。例如,HTML文件,GIF文件等。
- Accept-Charset :客户端接受的字符集。 utf-8,iso-8859-1等。
- 接受编码:客户端接受的数据编码它理解的文件格式,例如gzip。
- 接受语言:客户接受的自然语言(英语,德语等)。
检查服务器正在返回并修复问题!
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:
Can you help me for solving this problem?
解决方案
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!
这篇关于宁静的web服务HTTP 406错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文