http://bugs.winehq.org/show_bug.cgi?id=14183
Yann Droneaud yann@droneaud.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #14455|0 |1 is obsolete| |
--- Comment #4 from Yann Droneaud yann@droneaud.fr 2008-07-01 15:50:40 --- Created an attachment (id=14512) --> (http://bugs.winehq.org/attachment.cgi?id=14512) [PATCH] wininet: move cookie loading from HttpOpenRequest() to HttpSendRequest()
This patch does the following:
- Move cookie retrieval code to HTTP_HttpSendRequest() - Don't allocate memory for url if INTERNET_FLAG_NO_COOKIES is enabled - Be sure to not overflow lpszCookies: buffer size was nCookieSize + 1 + 8, written size is 8 + (nCookieSize - 1) + 2 + 1 - Optimized request header generation: sprintfW() replaced by strcpyW() strcatW() replaced by strcpyW() removed call to strlenW() for HTTP_HttpAddRequestHeadersW() - Use HTTP_ADDREQ_FLAG_ADD instead of HTTP_ADDHDR_FLAG_ADD - Use HTTP_ADDREQ_FLAG_REPLACE to replace the cookie instead of adding
I'm still wondering about HTTP_ADDREQ_FLAG_* versus HTTP_ADDHDR_FLAG_*, but I think the patch is ready for testing.
This patch also fix the problem spotted in comment #2
Patch generated with git format-patch