【发布时间】:2013-11-29 07:20:36
【问题描述】:
我正在尝试使用 chrome DHC 和 Advanced REST 客户端进行 REST 调用。例如:
对http://www.google.co.in 的 HEAD 呼叫 使用高级 REST 客户端给出:
Redirect To:https://www.google.co.in/ with status: 302 Show explanation HTTP/1.1 302 Found
Redirection information has not been cached.
Location: https://www.google.co.in/
Cache-Control: private
Content-Type: text/html; charset=UTF-8
Date: Fri, 29 Nov 2013 06:57:46 GMT
Server: gws
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
Alternate-Protocol: 80:quic
Content-Length: 222
Proxy-Connection: Keep-Alive
Connection: Keep-Alive
Status
200 OK Show explanation Loading time: 764
Request headers
Accept: application/json
Accept-Language: en-US
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36
X-Chrome-Variations: <some value>
Accept-Encoding: gzip,deflate,sdch
Cookie: <some value>
Response headers
status: 200 OK
version: HTTP/1.1
alternate-protocol: 443:quic
cache-control: private, max-age=0
content-encoding: gzip
content-length: 34821
content-type: text/html; charset=UTF-8
date: Fri, 29 Nov 2013 06:57:46 GMT
expires: -1
server: gws
x-frame-options: SAMEORIGIN
x-xss-protection: 1; mode=block
我对请求标头的详细信息更感兴趣,因为 "Accept-Charset" 无法识别。如果我将任何内容作为标头提供,它至少会显示在请求标头中。现在有一些问题:
为什么无法识别?这是客户端问题还是服务器问题?我需要使用任何其他客户端吗?我不知道。
如果它被识别,那么我应该能够在服务器代码中验证这个值,在我的例子中,它是在码头运行的?
谢谢, 阿喜
【问题讨论】:
标签: http rest http-headers jetty google-chrome-app