Q(Quality Values)的意思是客户端用户对语言的偏好值,范围0-1,默认是1。
http 1.1中小数点后最多能有三位:
qvalue = ( "0" [ "." 0*3DIGIT ] ) | ( "1" [ "." 0*3("0") ] )
-----------------------------------
HTTP content negotiation (section 12) uses short "floating point" numbers to indicate the relative importance ("weight") of various negotiable parameters. A weight is normalized to a real number in the range 0 through 1, where 0 is the minimum and 1 the maximum value. If a parameter has a quality value of 0, then content with this parameter is `not acceptable' for the client. HTTP/1.1 applications MUST NOT generate more than three digits after the decimal point. User configuration of these values SHOULD also be limited in this fashion. qvalue = ( "0" [ "." 0*3DIGIT ] )
| ( "1" [ "." 0*3("0") ] )"Quality values" is a misnomer, since these values merely represent relative degradation in desired quality. 例如你列出来的值意思是:
默认接受af-za(南非荷兰语)、af(荷兰语),其它语言按值大小表示可接受程度。
http 1.1中小数点后最多能有三位:
qvalue = ( "0" [ "." 0*3DIGIT ] ) | ( "1" [ "." 0*3("0") ] )
-----------------------------------
HTTP content negotiation (section 12) uses short "floating point" numbers to indicate the relative importance ("weight") of various negotiable parameters. A weight is normalized to a real number in the range 0 through 1, where 0 is the minimum and 1 the maximum value. If a parameter has a quality value of 0, then content with this parameter is `not acceptable' for the client. HTTP/1.1 applications MUST NOT generate more than three digits after the decimal point. User configuration of these values SHOULD also be limited in this fashion. qvalue = ( "0" [ "." 0*3DIGIT ] )
| ( "1" [ "." 0*3("0") ] )"Quality values" is a misnomer, since these values merely represent relative degradation in desired quality. 例如你列出来的值意思是:
默认接受af-za(南非荷兰语)、af(荷兰语),其它语言按值大小表示可接受程度。
解决方案 »
- hql两个表查找
- 给定一个ip地址,我要分别获取这个IP地址所在的省份、城市
- strut中提交动态表格的<tr>中的数据
- jsp开发出现Unknown tag
- 有关数据交换的问题,急!!!,你劳各位了
- jbuilder2005+weblogic8.1+jDataStore出现的问题
- 请教"Entity Bean"结合"Session Bean"怎样实现对数据库进行检索?
- ★★★【哪个更加适合我和我的计算机】★★★
- 诚招,急招软件工程师1名,月低薪10000
- mysql多实例多端口应用程序连接不上除3306端口外的端口,但远程连接都成功,就是应用程序不行如jdbc
- Spring Quartz对于多个Trigger的冲突问题
- 問一java反射機制問題, 在線..
很明显,就是前两个值为1的语言。
实际是默认每种语言用","分隔,第一个"af-za"是默认q=1的,然后其他","之间的用q的值来区别优先程度。多语言情况下需要区分的时候,可以用request.getLocale().getLanguage来返回首选地域选项(返回值是zh,en,ja等)。