Hans Leidekker : winhttp: Include the extra info part of the URL in the request.

Alexandre Julliard julliard at winehq.org
Wed Jul 27 13:25:24 CDT 2011


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

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Wed Jul 27 07:57:17 2011 +0200

winhttp: Include the extra info part of the URL in the request.

---

 dlls/winhttp/request.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c
index af69a41..4da4508 100644
--- a/dlls/winhttp/request.c
+++ b/dlls/winhttp/request.c
@@ -1,7 +1,7 @@
 /*
  * Copyright 2004 Mike McCormack for CodeWeavers
  * Copyright 2006 Rob Shearman for CodeWeavers
- * Copyright 2008 Hans Leidekker for CodeWeavers
+ * Copyright 2008, 2011 Hans Leidekker for CodeWeavers
  * Copyright 2009 Juan Lang
  *
  * This library is free software; you can redistribute it and/or
@@ -2450,18 +2450,19 @@ static HRESULT WINAPI winhttp_request_Open(
     uc.dwSchemeLength   = ~0u;
     uc.dwHostNameLength = ~0u;
     uc.dwUrlPathLength  = ~0u;
+    uc.dwExtraInfoLength = ~0u;
     if (!WinHttpCrackUrl( url, 0, 0, &uc )) return HRESULT_FROM_WIN32( get_last_error() );
 
     if (!(hostname = heap_alloc( (uc.dwHostNameLength + 1) * sizeof(WCHAR) ))) return E_OUTOFMEMORY;
     memcpy( hostname, uc.lpszHostName, uc.dwHostNameLength * sizeof(WCHAR) );
     hostname[uc.dwHostNameLength] = 0;
-    if (!(path = heap_alloc( (uc.dwUrlPathLength + 1) * sizeof(WCHAR) )))
+    if (!(path = heap_alloc( (uc.dwUrlPathLength + uc.dwExtraInfoLength + 1) * sizeof(WCHAR) )))
     {
         heap_free( hostname );
         return E_OUTOFMEMORY;
     }
-    memcpy( path, uc.lpszUrlPath, uc.dwUrlPathLength * sizeof(WCHAR) );
-    path[uc.dwUrlPathLength] = 0;
+    memcpy( path, uc.lpszUrlPath, (uc.dwUrlPathLength + uc.dwExtraInfoLength) * sizeof(WCHAR) );
+    path[uc.dwUrlPathLength + uc.dwExtraInfoLength] = 0;
 
     if (V_BOOL( &async ) == VARIANT_TRUE) flags |= WINHTTP_FLAG_ASYNC;
     if (!(hsession = WinHttpOpen( user_agentW, WINHTTP_ACCESS_TYPE_DEFAULT_PROXY, NULL, NULL, flags )))




More information about the wine-cvs mailing list