From 77a73922d4c1e5f4c3a64e58412df743a0bcf071 Mon Sep 17 00:00:00 2001 From: ap Date: Tue, 31 Oct 2006 18:43:09 +0000 Subject: [PATCH] 2006-10-31 MorganL Reviewed by Maciej. Fixes http://bugs.webkit.org/show_bug.cgi?id=11286 Includes some CRLF -> LF fixups. * platform/win/CookieJarWin.cpp: (WebCore::cookies): git-svn-id: https://svn.webkit.org/repository/webkit/trunk@17485 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- WebCore/ChangeLog | 10 ++++++++++ WebCore/platform/win/CookieJarWin.cpp | 19 +++++++++---------- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog index 475cbd716674..96c426404281 100644 --- a/WebCore/ChangeLog +++ b/WebCore/ChangeLog @@ -1,3 +1,13 @@ +2006-10-31 MorganL + + Reviewed by Maciej. + + Fixes http://bugs.webkit.org/show_bug.cgi?id=11286 + Includes some CRLF -> LF fixups. + + * platform/win/CookieJarWin.cpp: + (WebCore::cookies): + 2006-10-31 Adam Roben Reviewed by Steve. diff --git a/WebCore/platform/win/CookieJarWin.cpp b/WebCore/platform/win/CookieJarWin.cpp index 83592c930f3c..a5e6146ce788 100644 --- a/WebCore/platform/win/CookieJarWin.cpp +++ b/WebCore/platform/win/CookieJarWin.cpp @@ -48,16 +48,15 @@ String cookies(const KURL& url) DeprecatedString str = url.url(); str.append((UChar)'\0'); - DWORD count; - InternetGetCookie((UChar*)str.unicode(), 0, 0, &count); - if (count <= 1) // Null terminator counts as 1. - return String(); - - UChar* buffer = new UChar[count]; - InternetGetCookie((UChar*)str.unicode(), 0, buffer, &count); - String& result = String(buffer, count-1); // Ignore the null terminator. - delete buffer; - return result; + InternetGetCookie((UChar*)str.unicode(), 0, 0, &count); + if (count <= 1) // Null terminator counts as 1. + return String(); + + UChar* buffer = new UChar[count]; + InternetGetCookie((UChar*)str.unicode(), 0, buffer, &count); + String& result = String(buffer, count-1); // Ignore the null terminator. + delete[] buffer; + return result; } bool cookiesEnabled() -- 2.36.0