HTTP请求中缺少User-Agent是否有效? [英] Is lack of User-Agent in HTTP request valid?

查看:1926
本文介绍了HTTP请求中缺少User-Agent是否有效?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们注意到,有时会收到不带有效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屋!

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