1

我意识到这听起来像是一个奇怪的问题,但我在网络调用中看到了一些奇怪的结果,所以我试图弄清楚我是否误解了某些东西。

我看到在孤立事件中,当我上传数据时,即使响应为 200,数据也不会出现在服务器上。我的猜测是 200 响应在初始 HTTP 握手期间到达,然后在事后出现问题。这是对事件顺序的正确解释吗?或者,一旦服务器收集了发送头告诉它在请求中的任何数据,200 是否会交付?(因为如果是这样,那么我将回到绘图板上,了解我如何看待我所看到的)。

4

3 回答 3

5

这意味着它已经成功完成。来自HTTP /1.1 规范

10.2.1 200 OK

The request has succeeded. The information returned with the response is dependent on the method used in the request, for example:

GET an entity corresponding to the requested resource is sent in the response;

HEAD the entity-header fields corresponding to the requested resource are sent in the response without any message-body;

POST an entity describing or containing the result of the action;

TRACE an entity containing the request message as received by the end server.
于 2013-05-17T01:17:11.820 回答
2

完成的。否则没有意义。可能会出现问题,代码可能会引发错误。当服务器已经发送 200 OK 时,它如何发送该错误代码。

您遇到的可能是延迟、缓存、服务器发送 200 后运行的分离线程等。

于 2013-05-17T01:15:46.763 回答
1

直到服务器收到并处理完整的请求后,才会发送成功回复,如 200。另一方面,错误回复可能在请求被完全接收之前发送。如果发生这种情况,请停止发送您的请求。

于 2013-05-17T01:27:14.650 回答