将HTTP请求映射到HTTP响应 [英] Mapping HTTP requests to HTTP responses

查看:153
本文介绍了将HTTP请求映射到HTTP响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我向同一台服务器发出多个HTTP Get请求并获得每个HTTP 200 OK响应,如何使用Wireshark告诉哪个请求映射到哪个响应?

If I make multiple HTTP Get Requests to the same server and get HTTP 200 OK responses to each one how do I tell which request maps to which response using Wireshark?

目前它看起来像是一个http请求,并且很快收到下一个HTTP 200 OK响应,所以一切都按照正确的顺序进行。然而,我已经看到了相反的事情。例如,使用谷歌地图API v2我已经多次请求位置信息,然后以任意顺序接收信息(非常类似于我请求它的顺序,但不一定完美。)

Currently it looks like an http request is made, and the next HTTP 200 OK response is quickly received so everything is in a the proper sequence. I have seen things to the contrary however. For example using the Google Maps API v2 I've made several requests for location information and then the information is received in an arbitrary order (closely resembling the order in which I requested it, but not necessarily perfect.)

所以我的直觉是我不能假设我的回复将按特定顺序收到,即使它们可能在大多数情况下都是有序的。所以我想知道如何从响应中确定这个顺序。

So my intuition is I cannot assume that my responses will be received in a specific order, even though they may be in order most of the time. So I'm wondering how I can determine this order from the response.

更新:澄清我需要什么。我只需要知道服务器已收到请求。看起来我需要通过查看序列号甚至是ACKS来做到这一点。这种方法背后的原因是我基本上观察了一个网络应用程序并检查它是否正在发送信息并且正在接收信息。

Update: Clarification as to what I need. I just need to know that the server has received the request. It seems like I need to do this by looking at sequence numbers and perhaps even ACKS. The reasoning behind this approach is I'm basically observing a web app and checking it is sending the information and the information is being received.

更新:这无关与wireshark特别。我相信这让人很困惑,所以我把它从标题中删除了。它与TCP / IP协议之上的HTTP协议以及我们如何映射对请求的响应有关。

Update: This has nothing to do with wireshark specifically. I believe it is confusing people so I removing it from the title. It has to do with the HTTP protocol on top of the TCP/IP protocol and how we map responses to requests.

谢谢。

推荐答案

似乎这种能力不是由应用层的HTTP协议提供的,所以我必须转到传输层来确定这一点。在我的例子中,TCP / IP层使用序列号。

Seems like this ability is not provided by the HTTP protocol at the application layer so I must go down to the transportation layer to determine this. In my case the TCP/IP layer using sequence numbers.


HTTP只假设一个可靠的$
传输;任何提供
的协议都可以使用这种保证; HTTP / 1.1请求和
响应结构的
映射到有问题的协议


传输数据单元超出了
的范围规范。

HTTP only presumes a reliable
transport; any protocol that provides such guarantees can be used; the mapping of the HTTP/1.1 request and response structures onto the
transport data units of the protocol in question is outside the scope of this specification.

了解更多:
http://www.faqs.org/rfcs/rfc2616.html#ixzz0e20kxKcz

这篇关于将HTTP请求映射到HTTP响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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