【发布时间】:2014-09-09 21:00:01
【问题描述】:
我需要禁用大气请求标头的压缩。所以而不是: 接受编码:gzip、deflate
我想将其更改为: 接受编码:身份
这里是来自大气.js 创建的请求的标头:
Accept text/event-stream
Accept-Encoding gzip, deflate
Accept-Language en-US,en;q=0.5
Cache-Control no-cache
Connection keep-alive
Cookie JSESSIONID=791714A6221EEBBA
DNT 1
Host host
Pragma no-cache
Referer http://page url
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0
我在大气文档中发现您可以指定标题: headers [default = {}] 要发送的标头列表
但是如果我使用这个选项: headers={'Accept-Encoding':'identity'}
作为请求参数而不是标头传递。 以下是大气.js 创建的请求参数:
Accept-Encoding identity
Content-Type application/json
X-Atmosphere-Framework 2.1.2-jquery
X-Atmosphere-Transport sse
X-Atmosphere-tracking-id 3a8f82b4-bbd9-48d8-907a-6e54ac94cbd6
X-Cache-Date 0
X-atmo-protocol true
关于如何让 Atmosphere 在不压缩的情况下创建请求的任何想法?
【问题讨论】:
标签: atmosphere http-compression