winehq.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
January
2003
December
November
October
September
August
July
June
May
April
March
February
January
2002
December
November
October
September
August
July
June
May
April
March
February
January
2001
December
November
October
September
August
July
June
May
April
March
February
List overview
wine-commits
August 2010
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
----- 2003 -----
December 2003
November 2003
October 2003
September 2003
August 2003
July 2003
June 2003
May 2003
April 2003
March 2003
February 2003
January 2003
----- 2002 -----
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
February 2002
January 2002
----- 2001 -----
December 2001
November 2001
October 2001
September 2001
August 2001
July 2001
June 2001
May 2001
April 2001
March 2001
February 2001
wine-commits@winehq.org
2 participants
884 discussions
Start a n
N
ew thread
Detlef Riekenberg : qmgr/tests: Detect when the service is disabled.
by Alexandre Julliard
17 Aug '10
17 Aug '10
Module: wine Branch: master Commit: c9b0d7f15e6c5fc1033bcf5057f85fd13b6093f6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=c9b0d7f15e6c5fc1033bcf505…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Wed Aug 11 21:25:32 2010 +0200 qmgr/tests: Detect when the service is disabled. --- dlls/qmgr/tests/qmgr.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/dlls/qmgr/tests/qmgr.c b/dlls/qmgr/tests/qmgr.c index 8c95586..6dc9c1c 100644 --- a/dlls/qmgr/tests/qmgr.c +++ b/dlls/qmgr/tests/qmgr.c @@ -38,6 +38,11 @@ test_CreateInstance(void) /* Creating BITS instance */ hres = CoCreateInstance(&CLSID_BackgroundCopyManager, NULL, CLSCTX_LOCAL_SERVER, &IID_IBackgroundCopyManager, (void **) &manager); + + if(hres == __HRESULT_FROM_WIN32(ERROR_SERVICE_DISABLED)) { + skip("Needed Service is disabled\n"); + return; + } ok(hres == S_OK, "CoCreateInstance failed: %08x\n", hres); if(hres != S_OK) { skip("Unable to create bits instance.\n");
1
0
0
0
Wolfram Sang : kernel32: Change fixme to trace in comm.c.
by Alexandre Julliard
17 Aug '10
17 Aug '10
Module: wine Branch: master Commit: f999060f4d88d1595987a24862ed9b8b74e86aa6 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=f999060f4d88d1595987a2486…
Author: Wolfram Sang <wolfram(a)the-dreams.de> Date: Mon Aug 9 12:15:50 2010 +0200 kernel32: Change fixme to trace in comm.c. --- dlls/kernel32/comm.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/dlls/kernel32/comm.c b/dlls/kernel32/comm.c index f4edfd3..9653d6e 100644 --- a/dlls/kernel32/comm.c +++ b/dlls/kernel32/comm.c @@ -1138,7 +1138,7 @@ BOOL WINAPI GetCommProperties( HANDLE hFile, /* [in] handle of the comm port */ LPCOMMPROP lpCommProp) /* [out] pointer to struct to be filled */ { - FIXME("(%p %p )\n",hFile,lpCommProp); + TRACE("(%p %p)\n",hFile,lpCommProp); if(!lpCommProp) return FALSE; @@ -1150,7 +1150,6 @@ BOOL WINAPI GetCommProperties( lpCommProp->wPacketLength = 1; lpCommProp->wPacketVersion = 1; lpCommProp->dwServiceMask = SP_SERIALCOMM; - lpCommProp->dwReserved1 = 0; lpCommProp->dwMaxTxQueue = 4096; lpCommProp->dwMaxRxQueue = 4096; lpCommProp->dwMaxBaud = BAUD_115200;
1
0
0
0
Wolfram Sang : user32: Check for valid pointer in CreateIconFromResource.
by Alexandre Julliard
17 Aug '10
17 Aug '10
Module: wine Branch: master Commit: 9f0f17f8535879ed4807226062310e0858207026 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=9f0f17f8535879ed480722606…
Author: Wolfram Sang <wolfram(a)the-dreams.de> Date: Wed Aug 4 16:05:00 2010 +0200 user32: Check for valid pointer in CreateIconFromResource. --- dlls/user32/cursoricon.c | 5 +++-- dlls/user32/tests/cursoricon.c | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/dlls/user32/cursoricon.c b/dlls/user32/cursoricon.c index 9a1810e..938f0dd 100644 --- a/dlls/user32/cursoricon.c +++ b/dlls/user32/cursoricon.c @@ -1064,8 +1064,6 @@ static HCURSOR CURSORICON_CreateIconFromANI( const LPBYTE bits, DWORD bits_size, TRACE("bits %p, bits_size %d\n", bits, bits_size); - if (!bits) return 0; - riff_find_chunk( ANI_ACON_ID, ANI_RIFF_ID, &root_chunk, &ACON_chunk ); if (!ACON_chunk.data) { @@ -1104,6 +1102,7 @@ static HCURSOR CURSORICON_CreateIconFromANI( const LPBYTE bits, DWORD bits_size, width, height, depth ); frame_bits = HeapAlloc( GetProcessHeap(), 0, entry->dwDIBSize ); + if (!frame_bits) return 0; memcpy( frame_bits, icon_data + entry->dwDIBOffset, entry->dwDIBSize ); if (!header.width || !header.height) @@ -1142,6 +1141,8 @@ HICON WINAPI CreateIconFromResourceEx( LPBYTE bits, UINT cbSize, bits, cbSize, dwVersion, width, height, bIcon ? "icon" : "cursor", (cFlag & LR_MONOCHROME) ? "mono" : "" ); + if (!bits) return 0; + if (bIcon) { hotspot.x = width / 2; diff --git a/dlls/user32/tests/cursoricon.c b/dlls/user32/tests/cursoricon.c index b2e1d84..e81e76d 100644 --- a/dlls/user32/tests/cursoricon.c +++ b/dlls/user32/tests/cursoricon.c @@ -1005,6 +1005,11 @@ static void test_CreateIconFromResource(void) error = GetLastError(); ok(error == 0xdeadbeef, "Last error: %u\n", error); + /* Rejection of NULL pointer crashes at least on WNT4WSSP6, W2KPROSP4, WXPPROSP3 + * + * handle = CreateIconFromResource(NULL, ICON_RES_SIZE, TRUE, 0x00030000); + * ok(handle == NULL, "Invalid pointer accepted (%p)\n", handle); + */ HeapFree(GetProcessHeap(), 0, hotspot); }
1
0
0
0
Alexandre Goujon : atl: Fix AtlAxAttachControl wine check.
by Alexandre Julliard
17 Aug '10
17 Aug '10
Module: wine Branch: master Commit: e4bb3ae755cee67c7631425a4f21d9b3a2e22895 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=e4bb3ae755cee67c7631425a4…
Author: Alexandre Goujon <ale.goujon(a)gmail.com> Date: Sun Aug 15 12:01:28 2010 +0200 atl: Fix AtlAxAttachControl wine check. --- dlls/atl/atl_ax.c | 3 +++ dlls/atl/tests/atl_ax.c | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dlls/atl/atl_ax.c b/dlls/atl/atl_ax.c index d9d60a5..1293cb8 100644 --- a/dlls/atl/atl_ax.c +++ b/dlls/atl/atl_ax.c @@ -1053,6 +1053,9 @@ HRESULT WINAPI AtlAxAttachControl(IUnknown* pControl, HWND hWnd, IUnknown** ppUn *ppUnkContainer = (IUnknown*) pUnkContainer; } + if(!hWnd) + return S_FALSE; + return hr; } diff --git a/dlls/atl/tests/atl_ax.c b/dlls/atl/tests/atl_ax.c index d17046d..4555bd6 100644 --- a/dlls/atl/tests/atl_ax.c +++ b/dlls/atl/tests/atl_ax.c @@ -94,12 +94,10 @@ static void test_AtlAxAttachControl(void) } hr = pAtlAxAttachControl(pObj, NULL, NULL); - todo_wine ok(hr == S_FALSE, "Expected AtlAxAttachControl to return S_FALSE, got 0x%08x\n", hr); pContainer = (IUnknown *)0xdeadbeef; hr = pAtlAxAttachControl(pObj, NULL, &pContainer); - todo_wine ok(hr == S_FALSE, "Expected AtlAxAttachControl to return S_FALSE, got 0x%08x\n", hr); ok(pContainer != (IUnknown *)0xdeadbeef && pContainer != NULL,
1
0
0
0
Wolfgang Schwotzer : ws2_32/tests: Only log threads which not terminated by themselves.
by Alexandre Julliard
17 Aug '10
17 Aug '10
Module: wine Branch: master Commit: d640d3fa5c0d79fd739cc417ab74811129df9647 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d640d3fa5c0d79fd739cc417a…
Author: Wolfgang Schwotzer <wolfgang.schwotzer(a)gmx.net> Date: Sat Aug 14 11:52:59 2010 +0200 ws2_32/tests: Only log threads which not terminated by themselves. --- dlls/ws2_32/tests/sock.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index b2a3153..dba26e9 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -938,9 +938,11 @@ static void do_test( test_setup *test ) { for (i = 0; i <= n; i++) { - trace ("terminating thread %08x\n", thread_id[i]); if ( WaitForSingleObject ( thread[i], 0 ) != WAIT_OBJECT_0 ) + { + trace ("terminating thread %08x\n", thread_id[i]); TerminateThread ( thread [i], 0 ); + } } } CloseHandle ( server_ready );
1
0
0
0
Detlef Riekenberg : wineps: Use winspool.drv for job management.
by Alexandre Julliard
17 Aug '10
17 Aug '10
Module: wine Branch: master Commit: bd1941c3c214208949cc116fab32926bae0d2047 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=bd1941c3c214208949cc116fa…
Author: Detlef Riekenberg <wine.dev(a)web.de> Date: Thu Aug 12 14:37:36 2010 +0200 wineps: Use winspool.drv for job management. --- dlls/wineps.drv/escape.c | 152 +++++++++++----------------------------------- dlls/wineps.drv/psdrv.h | 1 + dlls/winspool.drv/info.c | 49 +++++++++++---- 3 files changed, 71 insertions(+), 131 deletions(-) Diff:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=bd1941c3c214208949cc1…
1
0
0
0
Thomas Mullaly : urlmon: Implemented IUri_IsEqual.
by Alexandre Julliard
17 Aug '10
17 Aug '10
Module: wine Branch: master Commit: 364b804d9e7ae8e5e5a626ef74d160827fc6316c URL:
http://source.winehq.org/git/wine.git/?a=commit;h=364b804d9e7ae8e5e5a626ef7…
Author: Thomas Mullaly <thomas.mullaly(a)gmail.com> Date: Mon Aug 2 17:03:34 2010 -0400 urlmon: Implemented IUri_IsEqual. --- dlls/urlmon/tests/uri.c | 61 +++++++++++++++++++++-- dlls/urlmon/uri.c | 127 ++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 181 insertions(+), 7 deletions(-) diff --git a/dlls/urlmon/tests/uri.c b/dlls/urlmon/tests/uri.c index 2da6766..aa30bc6 100644 --- a/dlls/urlmon/tests/uri.c +++ b/dlls/urlmon/tests/uri.c @@ -3623,28 +3623,79 @@ static const uri_equality equality_tests[] = { { "
HTTP://www.winehq.org/test
dir/./",0,FALSE, "
http://www.winehq.org/test
dir/../test dir/",0,FALSE, - TRUE, TRUE + TRUE, FALSE }, { /*
http://www.winehq.org/test%20dir
*/ "http://%77%77%77%2E%77%69%6E%65%68%71%2E%6F%72%67/%74%65%73%74%20%64%69%72",0,FALSE, "
http://www.winehq.org/test
dir",0,FALSE, - TRUE, TRUE, + TRUE, FALSE }, { "c:\\test.mp3",Uri_CREATE_ALLOW_IMPLICIT_FILE_SCHEME,FALSE, "file:///c:/test.mp3",0,FALSE, - TRUE,TRUE + TRUE, FALSE }, { "
ftp://ftp.winehq.org/
",0,FALSE, "
ftp://ftp.winehq.org
",0,FALSE, - TRUE, TRUE + TRUE, FALSE }, { "
ftp://ftp.winehq.org/test/test2/../../testB/
",0,FALSE, "
ftp://ftp.winehq.org/t%45stB/
",0,FALSE, - FALSE, TRUE + FALSE, FALSE + }, + { + "
http://google.com/TEST
",0,FALSE, + "
http://google.com/test
",0,FALSE, + FALSE, FALSE + }, + { + "
http://GOOGLE.com/
",0,FALSE, + "
http://google.com/
",0,FALSE, + TRUE, FALSE + }, + /* Performs case insensitive compare of host names (for known scheme types). */ + { + "
ftp://GOOGLE.com/
",Uri_CREATE_NO_CANONICALIZE,FALSE, + "
ftp://google.com/
",0,FALSE, + TRUE, FALSE + }, + { + "
zip://GOOGLE.com/
",0,FALSE, + "
zip://google.com/
",0,FALSE, + FALSE, FALSE + }, + { + "file:///c:/TEST/TeST/",0,FALSE, + "file:///c:/test/test/",0,FALSE, + TRUE, FALSE + }, + { + "file:///server/TEST",0,FALSE, + "file:///SERVER/TEST",0,FALSE, + TRUE, FALSE + }, + { + "
http://google.com
",Uri_CREATE_NO_CANONICALIZE,FALSE, + "
http://google.com/
",0,FALSE, + TRUE, FALSE + }, + { + "ftp://google.com:21/",0,FALSE, + "
ftp://google.com/
",0,FALSE, + TRUE, FALSE + }, + { + "
http://google.com:80/
",Uri_CREATE_NO_CANONICALIZE,FALSE, + "
http://google.com/
",0,FALSE, + TRUE, FALSE + }, + { + "
http://google.com:70/
",0,FALSE, + "
http://google.com:71/
",0,FALSE, + FALSE, FALSE } }; diff --git a/dlls/urlmon/uri.c b/dlls/urlmon/uri.c index 6d9eb3d..f3d9f68 100644 --- a/dlls/urlmon/uri.c +++ b/dlls/urlmon/uri.c @@ -28,6 +28,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(urlmon); +static const IID IID_IUriObj = {0x4b364760,0x9f51,0x11df,{0x98,0x1c,0x08,0x00,0x20,0x0c,0x9a,0x66}}; + typedef struct { const IUriVtbl *lpIUriVtbl; LONG ref; @@ -194,6 +196,15 @@ static const struct { {{'o','r','g',0}} }; +static Uri *get_uri_obj(IUri *uri) +{ + Uri *ret; + HRESULT hres; + + hres = IUri_QueryInterface(uri, &IID_IUriObj, (void**)&ret); + return SUCCEEDED(hres) ? ret : NULL; +} + static inline BOOL is_alpha(WCHAR val) { return ((val >= 'a' && val <= 'z') || (val >= 'A' && val <= 'Z')); } @@ -280,6 +291,104 @@ static inline BOOL is_path_delim(WCHAR val) { return (!val || val == '#' || val == '?'); } +/* Checks if the two Uri's are logically equivalent. It's a simple + * comparison, since they are both of type Uri, and it can access + * the properties of each Uri directly without the need to go + * through the "IUri_Get*" interface calls. + */ +static BOOL are_equal_simple(const Uri *a, const Uri *b) { + if(a->scheme_type == b->scheme_type) { + const BOOL known_scheme = a->scheme_type != URL_SCHEME_UNKNOWN; + const BOOL are_hierarchical = + (a->authority_start > -1 && b->authority_start > -1); + + if(a->scheme_type == URL_SCHEME_FILE) { + if(a->canon_len == b->canon_len) + return !StrCmpIW(a->canon_uri, b->canon_uri); + } + + /* Only compare the scheme names (if any) if their unknown scheme types. */ + if(!known_scheme) { + if((a->scheme_start > -1 && b->scheme_start > -1) && + (a->scheme_len == b->scheme_len)) { + /* Make sure the schemes are the same. */ + if(StrCmpNW(a->canon_uri+a->scheme_start, b->canon_uri+b->scheme_start, a->scheme_len)) + return FALSE; + } else if(a->scheme_len != b->scheme_len) + /* One of the Uri's has a scheme name, while the other doesn't. */ + return FALSE; + } + + /* If they have a userinfo component, perform case sensitive compare. */ + if((a->userinfo_start > -1 && b->userinfo_start > -1) && + (a->userinfo_len == b->userinfo_len)) { + if(StrCmpNW(a->canon_uri+a->userinfo_start, b->canon_uri+b->userinfo_start, a->userinfo_len)) + return FALSE; + } else if(a->userinfo_len != b->userinfo_len) + /* One of the Uri's had a userinfo, while the other one doesn't. */ + return FALSE; + + /* Check if they have a host name. */ + if((a->host_start > -1 && b->host_start > -1) && + (a->host_len == b->host_len)) { + /* Perform a case insensitive compare if they are a known scheme type. */ + if(known_scheme) { + if(StrCmpNIW(a->canon_uri+a->host_start, b->canon_uri+b->host_start, a->host_len)) + return FALSE; + } else if(StrCmpNW(a->canon_uri+a->host_start, b->canon_uri+b->host_start, a->host_len)) + return FALSE; + } else if(a->host_len != b->host_len) + /* One of the Uri's had a host, while the other one didn't. */ + return FALSE; + + if(a->has_port && b->has_port) { + if(a->port != b->port) + return FALSE; + } else if(a->has_port || b->has_port) + /* One had a port, while the other one didn't. */ + return FALSE; + + /* Windows is weird with how it handles paths. For example + * One URI could be "
http://google.com
" (after canonicalization) + * and one could be "
http://google.com/
" and the IsEqual function + * would still evaluate to TRUE, but, only if they are both hierarchical + * URIs. + */ + if((a->path_start > -1 && b->path_start > -1) && + (a->path_len == b->path_len)) { + if(StrCmpNW(a->canon_uri+a->path_start, b->canon_uri+b->path_start, a->path_len)) + return FALSE; + } else if(are_hierarchical && a->path_len == -1 && b->path_len == 0) { + if(*(a->canon_uri+a->path_start) != '/') + return FALSE; + } else if(are_hierarchical && b->path_len == 1 && a->path_len == 0) { + if(*(b->canon_uri+b->path_start) != '/') + return FALSE; + } else if(a->path_len != b->path_len) + return FALSE; + + /* Compare the query strings of the two URIs. */ + if((a->query_start > -1 && b->query_start > -1) && + (a->query_len == b->query_len)) { + if(StrCmpNW(a->canon_uri+a->query_start, b->canon_uri+b->query_start, a->query_len)) + return FALSE; + } else if(a->query_len != b->query_len) + return FALSE; + + if((a->fragment_start > -1 && b->fragment_start > -1) && + (a->fragment_len == b->fragment_len)) { + if(StrCmpNW(a->canon_uri+a->fragment_start, b->canon_uri+b->fragment_start, a->fragment_len)) + return FALSE; + } else if(a->fragment_len != b->fragment_len) + return FALSE; + + /* If we get here, the two URIs are equivalent. */ + return TRUE; + } + + return FALSE; +} + /* Computes the size of the given IPv6 address. * Each h16 component is 16bits, if there is an IPv4 address, it's * 32bits. If there's an elision it can be 16bits to 128bits, depending @@ -3008,6 +3117,10 @@ static HRESULT WINAPI Uri_QueryInterface(IUri *iface, REFIID riid, void **ppv) }else if(IsEqualGUID(&IID_IUri, riid)) { TRACE("(%p)->(IID_IUri %p)\n", This, ppv); *ppv = URI(This); + }else if(IsEqualGUID(&IID_IUriObj, riid)) { + TRACE("(%p)->(IID_IUriObj %p)\n", This, ppv); + *ppv = This; + return S_OK; }else { TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), ppv); *ppv = NULL; @@ -3693,6 +3806,8 @@ static HRESULT WINAPI Uri_GetProperties(IUri *iface, DWORD *pdwProperties) static HRESULT WINAPI Uri_IsEqual(IUri *iface, IUri *pUri, BOOL *pfEqual) { Uri *This = URI_THIS(iface); + Uri *other; + TRACE("(%p)->(%p %p)\n", This, pUri, pfEqual); if(!pfEqual) @@ -3705,8 +3820,16 @@ static HRESULT WINAPI Uri_IsEqual(IUri *iface, IUri *pUri, BOOL *pfEqual) return S_OK; } - FIXME("(%p)->(%p %p)\n", This, pUri, pfEqual); - return E_NOTIMPL; + /* Try to convert it to a Uri (allows for a more simple comparison). */ + if((other = get_uri_obj(pUri))) + *pfEqual = are_equal_simple(This, other); + else { + /* Do it the hard way. */ + FIXME("(%p)->(%p %p) No support for unknown IUri's yet.\n", iface, pUri, pfEqual); + return E_NOTIMPL; + } + + return S_OK; } #undef URI_THIS
1
0
0
0
Thomas Mullaly : urlmon: Print fixme for unsupported flags to CreateUri.
by Alexandre Julliard
17 Aug '10
17 Aug '10
Module: wine Branch: master Commit: d0d7663c103124be0c1c724f1986cd033090d0fc URL:
http://source.winehq.org/git/wine.git/?a=commit;h=d0d7663c103124be0c1c724f1…
Author: Thomas Mullaly <thomas.mullaly(a)gmail.com> Date: Sun Aug 1 17:01:22 2010 -0400 urlmon: Print fixme for unsupported flags to CreateUri. --- dlls/urlmon/uri.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/dlls/urlmon/uri.c b/dlls/urlmon/uri.c index ca7896a..6d9eb3d 100644 --- a/dlls/urlmon/uri.c +++ b/dlls/urlmon/uri.c @@ -3747,6 +3747,11 @@ static const IUriVtbl UriVtbl = { */ HRESULT WINAPI CreateUri(LPCWSTR pwzURI, DWORD dwFlags, DWORD_PTR dwReserved, IUri **ppURI) { + const DWORD supported_flags = Uri_CREATE_ALLOW_RELATIVE|Uri_CREATE_ALLOW_IMPLICIT_WILDCARD_SCHEME| + Uri_CREATE_ALLOW_IMPLICIT_FILE_SCHEME|Uri_CREATE_NO_CANONICALIZE|Uri_CREATE_CANONICALIZE| + Uri_CREATE_DECODE_EXTRA_INFO|Uri_CREATE_NO_DECODE_EXTRA_INFO|Uri_CREATE_CRACK_UNKNOWN_SCHEMES| + Uri_CREATE_NO_CRACK_UNKNOWN_SCHEMES|Uri_CREATE_PRE_PROCESS_HTML_URI|Uri_CREATE_NO_PRE_PROCESS_HTML_URI| + Uri_CREATE_NO_IE_SETTINGS|Uri_CREATE_NO_ENCODE_FORBIDDEN_CHARACTERS; Uri *ret; HRESULT hr; parse_data data; @@ -3771,6 +3776,10 @@ HRESULT WINAPI CreateUri(LPCWSTR pwzURI, DWORD dwFlags, DWORD_PTR dwReserved, IU return E_INVALIDARG; } + /* Currently unsupported. */ + if(dwFlags & ~supported_flags) + FIXME("Ignoring unsupported flags %x\n", dwFlags & ~supported_flags); + ret = heap_alloc(sizeof(Uri)); if(!ret) return E_OUTOFMEMORY;
1
0
0
0
Thomas Mullaly : urlmon: Added support for invalid flag combinations to CreateUri.
by Alexandre Julliard
17 Aug '10
17 Aug '10
Module: wine Branch: master Commit: 0daa39fa97a0b078ac09f3af56964d6bb4dcd4f1 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=0daa39fa97a0b078ac09f3af5…
Author: Thomas Mullaly <thomas.mullaly(a)gmail.com> Date: Sun Aug 1 16:29:27 2010 -0400 urlmon: Added support for invalid flag combinations to CreateUri. --- dlls/urlmon/tests/uri.c | 8 +++----- dlls/urlmon/uri.c | 10 ++++++++++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/dlls/urlmon/tests/uri.c b/dlls/urlmon/tests/uri.c index bae4c33..2da6766 100644 --- a/dlls/urlmon/tests/uri.c +++ b/dlls/urlmon/tests/uri.c @@ -3683,11 +3683,9 @@ static void test_CreateUri_InvalidFlags(void) { IUri *uri = (void*) 0xdeadbeef; hr = pCreateUri(http_urlW, invalid_flag_tests[i].flags, 0, &uri); - todo_wine { - ok(hr == invalid_flag_tests[i].expected, "Error: CreateUri returned 0x%08x, expected 0x%08x, flags=0x%08x\n", - hr, invalid_flag_tests[i].expected, invalid_flag_tests[i].flags); - } - todo_wine { ok(uri == NULL, "Error: expected the IUri to be NULL, but it was %p instead\n", uri); } + ok(hr == invalid_flag_tests[i].expected, "Error: CreateUri returned 0x%08x, expected 0x%08x, flags=0x%08x\n", + hr, invalid_flag_tests[i].expected, invalid_flag_tests[i].flags); + ok(uri == NULL, "Error: expected the IUri to be NULL, but it was %p instead\n", uri); } } diff --git a/dlls/urlmon/uri.c b/dlls/urlmon/uri.c index 1c831c7..ca7896a 100644 --- a/dlls/urlmon/uri.c +++ b/dlls/urlmon/uri.c @@ -3761,6 +3761,16 @@ HRESULT WINAPI CreateUri(LPCWSTR pwzURI, DWORD dwFlags, DWORD_PTR dwReserved, IU return E_INVALIDARG; } + /* Check for invalid flags. */ + if((dwFlags & Uri_CREATE_DECODE_EXTRA_INFO && dwFlags & Uri_CREATE_NO_DECODE_EXTRA_INFO) || + (dwFlags & Uri_CREATE_CANONICALIZE && dwFlags & Uri_CREATE_NO_CANONICALIZE) || + (dwFlags & Uri_CREATE_CRACK_UNKNOWN_SCHEMES && dwFlags & Uri_CREATE_NO_CRACK_UNKNOWN_SCHEMES) || + (dwFlags & Uri_CREATE_PRE_PROCESS_HTML_URI && dwFlags & Uri_CREATE_NO_PRE_PROCESS_HTML_URI) || + (dwFlags & Uri_CREATE_IE_SETTINGS && dwFlags & Uri_CREATE_NO_IE_SETTINGS)) { + *ppURI = NULL; + return E_INVALIDARG; + } + ret = heap_alloc(sizeof(Uri)); if(!ret) return E_OUTOFMEMORY;
1
0
0
0
Thomas Mullaly : urlmon: Added support for pre-processing URI strings.
by Alexandre Julliard
17 Aug '10
17 Aug '10
Module: wine Branch: master Commit: b3ad7469d0b94cd3e226063202f8a460174add70 URL:
http://source.winehq.org/git/wine.git/?a=commit;h=b3ad7469d0b94cd3e22606320…
Author: Thomas Mullaly <thomas.mullaly(a)gmail.com> Date: Sun Aug 1 16:17:58 2010 -0400 urlmon: Added support for pre-processing URI strings. --- dlls/urlmon/tests/uri.c | 121 ++++++++++++++++++++++++++++++++++++++++++++++- dlls/urlmon/uri.c | 47 +++++++++++++++++- 2 files changed, 165 insertions(+), 3 deletions(-) diff --git a/dlls/urlmon/tests/uri.c b/dlls/urlmon/tests/uri.c index 98c328a..bae4c33 100644 --- a/dlls/urlmon/tests/uri.c +++ b/dlls/urlmon/tests/uri.c @@ -3430,6 +3430,123 @@ static const uri_properties uri_tests[] = { {URL_SCHEME_HTTP,S_OK,FALSE}, {URLZONE_INVALID,E_NOTIMPL,FALSE}, } + }, + /* Leading/Trailing whitespace is removed. */ + { "
http://google.com/
", 0, S_OK, FALSE, + Uri_HAS_ABSOLUTE_URI|Uri_HAS_AUTHORITY|Uri_HAS_DISPLAY_URI|Uri_HAS_DOMAIN| + Uri_HAS_HOST|Uri_HAS_PATH|Uri_HAS_PATH_AND_QUERY|Uri_HAS_RAW_URI| + Uri_HAS_SCHEME_NAME|Uri_HAS_HOST_TYPE|Uri_HAS_PORT|Uri_HAS_SCHEME, + FALSE, + { + {"
http://google.com/
",S_OK,FALSE}, + {"
google.com
",S_OK,FALSE}, + {"
http://google.com/
",S_OK,FALSE}, + {"
google.com
",S_OK,FALSE}, + {"",S_FALSE,FALSE}, + {"",S_FALSE,FALSE}, + {"
google.com
",S_OK,FALSE}, + {"",S_FALSE,FALSE}, + {"/",S_OK,FALSE}, + {"/",S_OK,FALSE}, + {"",S_FALSE,FALSE}, + {"
http://google.com/
",S_OK,FALSE}, + {"http",S_OK,FALSE}, + {"",S_FALSE,FALSE}, + {"",S_FALSE,FALSE} + }, + { + {Uri_HOST_DNS,S_OK,FALSE}, + {80,S_OK,FALSE}, + {URL_SCHEME_HTTP,S_OK,FALSE}, + {URLZONE_INVALID,E_NOTIMPL,FALSE} + } + }, + { "\t\t\r\nhttp\n://g\noogle.co\rm/\n\n\n", 0, S_OK, FALSE, + Uri_HAS_ABSOLUTE_URI|Uri_HAS_AUTHORITY|Uri_HAS_DISPLAY_URI|Uri_HAS_DOMAIN| + Uri_HAS_HOST|Uri_HAS_PATH|Uri_HAS_PATH_AND_QUERY|Uri_HAS_RAW_URI| + Uri_HAS_SCHEME_NAME|Uri_HAS_HOST_TYPE|Uri_HAS_PORT|Uri_HAS_SCHEME, + FALSE, + { + {"
http://google.com/
",S_OK,FALSE}, + {"
google.com
",S_OK,FALSE}, + {"
http://google.com/
",S_OK,FALSE}, + {"
google.com
",S_OK,FALSE}, + {"",S_FALSE,FALSE}, + {"",S_FALSE,FALSE}, + {"
google.com
",S_OK,FALSE}, + {"",S_FALSE,FALSE}, + {"/",S_OK,FALSE}, + {"/",S_OK,FALSE}, + {"",S_FALSE,FALSE}, + {"
http://google.com/
",S_OK,FALSE}, + {"http",S_OK,FALSE}, + {"",S_FALSE,FALSE}, + {"",S_FALSE,FALSE} + }, + { + {Uri_HOST_DNS,S_OK,FALSE}, + {80,S_OK,FALSE}, + {URL_SCHEME_HTTP,S_OK,FALSE}, + {URLZONE_INVALID,E_NOTIMPL,FALSE} + } + }, + { "
http://g\noogle.co\rm/\n\n\n
", Uri_CREATE_NO_PRE_PROCESS_HTML_URI, S_OK, FALSE, + Uri_HAS_ABSOLUTE_URI|Uri_HAS_AUTHORITY|Uri_HAS_DISPLAY_URI|Uri_HAS_DOMAIN| + Uri_HAS_HOST|Uri_HAS_PATH|Uri_HAS_PATH_AND_QUERY|Uri_HAS_RAW_URI| + Uri_HAS_SCHEME_NAME|Uri_HAS_HOST_TYPE|Uri_HAS_PORT|Uri_HAS_SCHEME, + FALSE, + { + {"
http://g%0aoogle.co%0dm/%0A%0A%0A
",S_OK,FALSE}, + {"g%0aoogle.co%0dm",S_OK,FALSE}, + {"
http://g%0aoogle.co%0dm/%0A%0A%0A
",S_OK,FALSE}, + {"g%0aoogle.co%0dm",S_OK,FALSE}, + {"",S_FALSE,FALSE}, + {"",S_FALSE,FALSE}, + {"g%0aoogle.co%0dm",S_OK,FALSE}, + {"",S_FALSE,FALSE}, + {"/%0A%0A%0A",S_OK,FALSE}, + {"/%0A%0A%0A",S_OK,FALSE}, + {"",S_FALSE,FALSE}, + {"
http://g\noogle.co\rm/\n\n\n
",S_OK,FALSE}, + {"http",S_OK,FALSE}, + {"",S_FALSE,FALSE}, + {"",S_FALSE,FALSE} + }, + { + {Uri_HOST_DNS,S_OK,FALSE}, + {80,S_OK,FALSE}, + {URL_SCHEME_HTTP,S_OK,FALSE}, + {URLZONE_INVALID,E_NOTIMPL,FALSE} + } + }, + { "zip://g\noogle.co\rm/\n\n\n", Uri_CREATE_NO_PRE_PROCESS_HTML_URI, S_OK, FALSE, + Uri_HAS_ABSOLUTE_URI|Uri_HAS_AUTHORITY|Uri_HAS_DISPLAY_URI|Uri_HAS_DOMAIN| + Uri_HAS_HOST|Uri_HAS_PATH|Uri_HAS_PATH_AND_QUERY|Uri_HAS_RAW_URI| + Uri_HAS_SCHEME_NAME|Uri_HAS_HOST_TYPE|Uri_HAS_SCHEME, + FALSE, + { + {"zip://g\noogle.co\rm/\n\n\n",S_OK,FALSE}, + {"g\noogle.co\rm",S_OK,FALSE}, + {"zip://g\noogle.co\rm/\n\n\n",S_OK,FALSE}, + {"g\noogle.co\rm",S_OK,FALSE}, + {"",S_FALSE,FALSE}, + {"",S_FALSE,FALSE}, + {"g\noogle.co\rm",S_OK,FALSE}, + {"",S_FALSE,FALSE}, + {"/\n\n\n",S_OK,FALSE}, + {"/\n\n\n",S_OK,FALSE}, + {"",S_FALSE,FALSE}, + {"zip://g\noogle.co\rm/\n\n\n",S_OK,FALSE}, + {"zip",S_OK,FALSE}, + {"",S_FALSE,FALSE}, + {"",S_FALSE,FALSE} + }, + { + {Uri_HOST_DNS,S_OK,FALSE}, + {0,S_FALSE,FALSE}, + {URL_SCHEME_UNKNOWN,S_OK,FALSE}, + {URLZONE_INVALID,E_NOTIMPL,FALSE} + } } }; @@ -3486,7 +3603,9 @@ static const invalid_uri invalid_uri_tests[] = { /* Known scheme types can't have invalid % encoded data in query string. */ {"
http://google.com/?query=te%xx
",0,FALSE}, /* Invalid % encoded data in fragment of know scheme type. */ - {"
ftp://google.com/#Test%xx
",0,FALSE} + {"
ftp://google.com/#Test%xx
",0,FALSE}, + {"
http://google.com/
",Uri_CREATE_NO_PRE_PROCESS_HTML_URI,FALSE}, + {"\n\nhttp://google.com/",Uri_CREATE_NO_PRE_PROCESS_HTML_URI,FALSE} }; typedef struct _uri_equality { diff --git a/dlls/urlmon/uri.c b/dlls/urlmon/uri.c index c4aa1b0..1c831c7 100644 --- a/dlls/urlmon/uri.c +++ b/dlls/urlmon/uri.c @@ -626,6 +626,45 @@ static void compute_elision_location(const ipv6_address *address, const USHORT v *count = max_len; } +/* Removes all the leading and trailing white spaces or + * control characters from the URI and removes all control + * characters inside of the URI string. + */ +static BSTR pre_process_uri(LPCWSTR uri) { + BSTR ret; + DWORD len; + const WCHAR *start, *end; + WCHAR *buf, *ptr; + + len = lstrlenW(uri); + + start = uri; + /* Skip leading controls and whitespace. */ + while(iscntrlW(*start) || isspaceW(*start)) ++start; + + end = uri+len-1; + if(start == end) + /* URI consisted only of control/whitespace. */ + ret = SysAllocStringLen(NULL, 0); + else { + while(iscntrlW(*end) || isspaceW(*end)) --end; + + buf = heap_alloc(((end+1)-start)*sizeof(WCHAR)); + if(!buf) + return NULL; + + for(ptr = buf; start < end+1; ++start) { + if(!iscntrlW(*start)) + *ptr++ = *start; + } + + ret = SysAllocStringLen(buf, ptr-buf); + heap_free(buf); + } + + return ret; +} + /* Converts the specified IPv4 address into an uint value. * * This function assumes that the IPv4 address has already been validated. @@ -3729,8 +3768,12 @@ HRESULT WINAPI CreateUri(LPCWSTR pwzURI, DWORD dwFlags, DWORD_PTR dwReserved, IU ret->lpIUriVtbl = &UriVtbl; ret->ref = 1; - /* Create a copy of pwzURI and store it as the raw_uri. */ - ret->raw_uri = SysAllocString(pwzURI); + /* Pre process the URI, unless told otherwise. */ + if(!(dwFlags & Uri_CREATE_NO_PRE_PROCESS_HTML_URI)) + ret->raw_uri = pre_process_uri(pwzURI); + else + ret->raw_uri = SysAllocString(pwzURI); + if(!ret->raw_uri) { heap_free(ret); return E_OUTOFMEMORY;
1
0
0
0
← Newer
1
...
55
56
57
58
59
60
61
...
89
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
Results per page:
10
25
50
100
200