HTTP请求中缺少User-Agent是否有效? [英] Is lack of User-Agent in HTTP request valid?
问题描述
我们注意到,有时会收到不带有效User-Agent字符串的HTTP请求.现实世界中是否存在接受这种类型的HTTP请求的有效案例?
We've noticed that from time to time we will get a HTTP request without a valid User-Agent string. Is there any valid real-world case for accepting this type of HTTP request?
即为什么我们不自动阻止从中收到此类请求的所有IP?
i.e. Why wouldn't we auto block all IP's from which this type of request is received?
更新 我用现实世界"这个短语的意图是表明我不是在问技术上可能发生或不可能发生的事情.显然,可以提交没有某些标头的HTTP请求.我想知道允许这种类型的HTTP请求进入您的服务器的情况如何?
UPDATE My intention with the phrase "real-world" was to indicate that I am not asking about what technically can or can't happen. Obviously its possible to submit HTTP requests without some headers. I am wondering what "real-world" case you would have for allowing this type of HTTP request into your server.
推荐答案
我想很多人在使用API执行请求时,大多会在没有User-Agent的情况下使用HTTP请求.
I guess many people use HTTP requests without a User-Agent mostly when they are using an API to perform the request.
这篇关于HTTP请求中缺少User-Agent是否有效?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!