HTTP: The Definitive Guide

17.3.2 Content-Negotiation Header Quality Values
The HTTP protocol defines quality values to allow clients to list multiple choices for each category of
preference and associate an order of preference with each choice. For example, clients can send an
Accept-Language header of the form:
Accept-Language: en;q=0.5, fr;q=0.0, nl;q=1.0, tr;q=0.0
Where the q values can range from 0.0 to 1.0 (with 0.0 being the lowest preference and 1.0 being the
highest). The header above, then, says that the client prefers to receive a Dutch (nl) version of the
document, but an English (en) version will do. Under no circumstances does the client want a French
(fr) or Turkish (tr) version, though. Note that the order in which the preferences are listed is not
important; only the q values associated with them are.
Occasionally, the server may not have any documents that match any of the client's preferences. In
this case, the server may change or transcode the document to match the client's preferences. This
mechanism is discussed later in this chapter.

Content-Negotiation Header Quality Values的更多相关文章

  1. WebApi2官网学习记录---Content Negotiation

    Content Negotiation的意思是:当有多种Content-Type可供选择时,选择最合适的一种进行序列化并返回给client. 主要依据请求中的Accept.Accept-Charset ...

  2. Spring MVC Content Negotiation 转载

    Spring MVC Content Negotiation 2017年11月15日 00:21:21 carl-zhao 阅读数:2983   Spring MVC有两种方式生成output的方法: ...

  3. Content Negotiation using Spring MVC

    There are two ways to generate output using Spring MVC: You can use the RESTful @ResponseBody approa ...

  4. Content Negotiation in ASP.NET Web API

    本文描述Web API实现内容协商(content negotiation). The HTTP specification (RFC 2616) defines content negotiatio ...

  5. the request doesn't contain a multipart/form-data or multipart/form-data stream, content type header

    the request doesn't contain a multipart/form-data or multipart/form-data stream, content type header ...

  6. Content Negotiation(内容协商)

    Asp.Net Web API 2第十四课——Content Negotiation(内容协商)   前言 阅读本文之前,您也可以到Asp.Net Web API 2 系列导航进行查看 http:// ...

  7. Asp.Net Web API 2第十四课——Content Negotiation(内容协商)

    前言 阅读本文之前,您也可以到Asp.Net Web API 2 系列导航进行查看 http://www.cnblogs.com/aehyok/p/3446289.html 本文描述ASP.NET W ...

  8. 浅析Content Negotation在Nancy的实现和使用

    背景介绍 什么是Content Negotation呢?翻译成中文的话就是"内容协商".当然,如果不清楚HTTP规范(RFC 2616)的话,可以对这个翻译也是一头雾水. 先来看看 ...

  9. http header cache-control (request和response区别)

    摘要:(1)网络服务会根据 request的header中的 cache-control策略设置response的cache-control策略 1 response cache-control 和 ...

随机推荐

  1. Shape Control for .NET

    Shape Control for .NET Yang Kok Wah, 23 Mar 2017 CPOL    4.83 (155 votes)   Rate this: vote 1vote 2v ...

  2. Windows Phone Unit Test 环境搭建

    单元测试对工程质量带来的作用就不详细说明了,本文只讨论如何在WP开发环境下搭建测试工程     历史 从WP7时代官方是不支持UnitTest工程的,因此需要采用WPToolkitTest这个工程来实 ...

  3. 基于js鼠标拖动图片排序

    分享一款基于js的图片排序效果.鼠标拖动图片,重新排列图片的排列顺序.该插件适用浏览器:IE8.360.FireFox.Chrome.Safari.Opera.傲游.搜狗.世界之窗.效果图如下: 在线 ...

  4. mysql学习笔记1---mysql ERROR 1045 (28000): 错误解决办法

    mysql ERROR 1045 (28000): 错误解决办法 在启动mysql服务后,登陆mysql的窗口的时候,执行mysql命令,结果报错,没法登陆.   (在安装mysql和配置的时候,我是 ...

  5. 一题关于PHP的CTF

    if(isset($_GET['time'])){ if(!is_numeric($_GET['time'])){ echo 'The time must be number.'; }else if( ...

  6. 几种在Linux下查询外网IP的办法。

    几种在Linux下查询外网IP的办法.   Curl 纯文本格式输出: curl icanhazip.com curl ifconfig.me curl curlmyip.com curl ip.ap ...

  7. 如何修改织梦官方flash幻灯片的方法

    源代码: <!-- size: 280px * 192px --> <script language='javascript'> linkarr = new Array(); ...

  8. AD smart pdf 中文丢失

    Altium Designer将原理图通过smart pdf导出,原理图中的中文丢失了. 将原理图中的所有中文字体改为宋体即可. 百度知道上的也有说: 打开软件后,点击左上角的[DXP]→[Prefe ...

  9. 【BZOJ】1053: [HAOI2007]反素数ant(贪心+dfs)

    http://www.lydsy.com/JudgeOnline/problem.php?id=1053 约数个数等于分解出的质因数的(指数+1)的乘积这个就不用说了吧... 然后好神的题在于贪心.. ...

  10. Maven中将所有依赖的jar包全部导出到文件夹

    因为我要对Java类的功能在生产环境(服务器端)进行测试,所以需要将jar包导出,然后在服务器端用-Djava.ext.dirs=./lib的方式走一遍, 下面是解决方案: 在pom.xml中加入如下 ...