I mean, some apps will send http requests to certain servers, like some games or facebook. So is there a way to identify which app is sending it by looking at the http header?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You might be able to identify the default headers, but since they can be altered by whatever program the client is running, there's no guarantees.
For what it's worth, here is the user-agent header my Android handset sends:
Moxilla/5.0 (Linux; U; Android 2.2; en-us; T-Mobile G2 Build/FRF91) AppleWebKit/533.1(KHTML, like Gecko) Version/4.0 Mobile Safari/533.1
回答2:
So is there a way to identify which app is sending it?
Generally, no. Some apps might modify the user agent, but most probably leave it alone.
回答3:
Almost all requests will have some form of identification in them. Often the server API requires this identification.
However, there is no general rule for how the clients identify themselves. As a human looking through the request logs, you will often be able to tell what app they are coming from; however, I doubt there is a standardized or automated way to do this.