& quot; If-Modified-Since& quot;标头 [英] "If-Modified-Since" header

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

问题描述

任何人都可以向我解释为什么如果已修改-自此"在我的http客户端中不起作用...?

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

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

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"
}

但是我仍然得到每个文件."If-modified-since"根本行不通.也许它没有在服务器中实现?如果是这样,有人可以指出实现此标头的服务器吗?还是解释我做错了什么?

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?

感谢帮助

推荐答案

感谢您的帮助!

你简直不敢相信我犯了一个错误...在我的代码中,我写的是"If-Modified_Since"而不是"If-Modified-Since" ...

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

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

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

但是当我的请求是例如"zbcdefghijk"时-httpbin.org/get告诉我我发送的正是该标头(当然不存在).

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

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

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

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

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