HTTP请求中缺少用户代理是否有效 [英] Is lack of user-agent in HTTP request valid

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

问题描述

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

推荐答案

我猜测很多人在没有User-Agent的情况下使用HTTP请求,主要是因为他们使用API​​来执行请求。

I guess many people use HTTP requests without a User-Agent mostly when they are using an API to perform the request.

这篇关于HTTP请求中缺少用户代理是否有效的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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