我正在创建一个从Heroku请求JSON的iPhone应用程序。
NSURLConnection (与委托协议),如Xcode文档中所描述的那样。
当我这么做时:
卷曲-I http://acani.heroku.com/users/4c96ee4f1467281352000049/1234/50/50
我得到:
HTTP/1.1 200 OK Server: nginx/0.7.67日期: Sun,201010月17日16:27:25格林尼治时间-类型:应用程序/json连接:保持活动内容-长度: 11532 X-清漆: 2314841869年代:0通过: 1.1清漆谢谢!
哑光
发布于 2010-10-19 05:05:03
要检测响应是否被压缩,需要查找Content-Encoding头。可以将其设置为gzip、compress或deflate。有关更多细节,请参见RFC 2616第3.5节。
发布于 2020-06-28 10:53:18
请不要对任何标准的相关常数使用RFС。我建议您改用iana登记册。如果您需要Content-Encoding,那么您可以使用http-parameters.xml。
HTTP内容编码登记处:
aes128gcm
br
compress
deflate
exi
gzip
identity
pack200-gzip
x-compress
x-gzip
zstd您可以做更好的解决方案:
#!/bin/sh
torsocks wget \
--recursive \
--domains "iana.org" \
--no-parent "https://www.iana.org/protocols" \
--accept-regex "https://www.iana.org/(assignments|protocols)/.*"git init
./download.sh
git add . && git commit您需要从标准中找到任何常量吗?只有grep iana文件夹。你需要熟悉所有最近的变化吗?download.sh && git diff。
https://stackoverflow.com/questions/3954144
复制相似问题