“If-Modified-Since”标题 [英] "If-Modified-Since" header

查看:183
本文介绍了“If-Modified-Since”标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以解释我为什么如果修改 - 自不能在我的http客户端工作...?



我检查我在httpbin.org中发送的内容:

  {
url:http://www.httpbin.org/get,
headers:{
Content-Length:,
Connection:keep-alive,
Accept:* / * $ bHost:www.httpbin.org,
If-Modified-Since:Mon,12 Nov 2012 18:00:00 GMT,
Content-Type:
},
args:{},
origin:89.70.183.105
}
pre>

但我还是得到每个文件。 如果修改自简单地不工作。也许它没有在服务器中实现?如果是这样,任何人可以指向已实现这个头的服务器?

解决方案



谢谢您的帮助!



你不能相信我有错误...
在我的代码中我写了 If-Modified_Since而不是If-Modified-Since...



这很奇怪,因为httpbin.org/get告诉我, -Since...(!!!)



但是当我的请求是例如:zbcdefghijk - httpbin.org/get显示我,



我花了7个小时找我的错误。 ;(很难找到,因为我太信任httpbin.org。:((((


Could anyone explain me why "If modified-Since" doesn't work in my http client...?

I check what I send in httpbin.org:

{
"url": "http://www.httpbin.org/get",
"headers": {
"Content-Length": "",
"Connection": "keep-alive",
"Accept": "*/*",
"Host": "www.httpbin.org",
"If-Modified-Since": "Mon, 12 Nov 2012 18:00:00 GMT",
"Content-Type": ""
},
"args": {    },
"origin": "89.70.183.105"
}

But I still get every file. "If-modified-since" simply doesn't work. Maybe it's not implemented in servers? If so, could anyone point me server that has implemented this header? Or explain what I'm doing wrong?

Thanks for help

解决方案

Thank You for Your help!

You can't believe where I had a mistake... In my code I wrote "If-Modified_Since" instead of "If-Modified-Since"...

It's very weird, because httpbin.org/get tell me that I send "If-Modified-Since"...(!!!)

But when my request is for example: "zbcdefghijk" - httpbin.org/get shows me that I sent exactly that header (that not exist of course).

I spent 7 hours looking for my mistake. ;( It was difficult to find because I too much trusted httpbin.org. :(((((

这篇关于“If-Modified-Since”标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆