Hans Leidekker : rpcrt4: Accept HTTP idle packets while waiting for the second prepare header.

Alexandre Julliard julliard at winehq.org
Thu Feb 21 14:29:36 CST 2013


Module: wine
Branch: master
Commit: 164ddbca8c232470c825a0b75e183cef5250490a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=164ddbca8c232470c825a0b75e183cef5250490a

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Thu Feb 21 10:47:45 2013 +0100

rpcrt4: Accept HTTP idle packets while waiting for the second prepare header.

---

 dlls/rpcrt4/rpc_transport.c |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/dlls/rpcrt4/rpc_transport.c b/dlls/rpcrt4/rpc_transport.c
index 54f0faa..e3e428b 100644
--- a/dlls/rpcrt4/rpc_transport.c
+++ b/dlls/rpcrt4/rpc_transport.c
@@ -2324,9 +2324,22 @@ static RPC_STATUS rpcrt4_http_prepare_out_pipe(HINTERNET out_request,
     if (status != RPC_S_OK) return status;
     TRACE("received (%d) from first prepare header\n", field1);
 
-    status = rpcrt4_http_read_http_packet(out_request, &pkt_from_server,
-                                          &data_from_server);
-    if (status != RPC_S_OK) return status;
+    for (;;)
+    {
+        status = rpcrt4_http_read_http_packet(out_request, &pkt_from_server,
+                                              &data_from_server);
+        if (status != RPC_S_OK) return status;
+        if (pkt_from_server.http.flags != 0x0001) break;
+
+        TRACE("http idle packet, waiting for real packet\n");
+        HeapFree(GetProcessHeap(), 0, data_from_server);
+        if (pkt_from_server.http.num_data_items != 0)
+        {
+            ERR("HTTP idle packet should have no data items instead of %d\n",
+                pkt_from_server.http.num_data_items);
+            return RPC_S_PROTOCOL_ERROR;
+        }
+    }
     status = RPCRT4_ParseHttpPrepareHeader2(&pkt_from_server, data_from_server,
                                             &field1, flow_control_increment,
                                             &field3);




More information about the wine-cvs mailing list