Commit 1e0827f6 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

shlwapi: Allow ' ' in hostname and password in UrlGetPart.

parent c23b0b0b
......@@ -519,6 +519,9 @@ static void test_url_part(const char* szUrl, DWORD dwPart, DWORD dwFlags, const
static void test_UrlGetPart(void)
{
const char* file_url = "file://h o s t/c:/windows/file";
const char* http_url = "http://user:pass 123@www.wine hq.org";
CHAR szPart[INTERNET_MAX_URL_LENGTH];
DWORD dwSize;
HRESULT res;
......@@ -544,6 +547,11 @@ static void test_UrlGetPart(void)
test_url_part(TEST_URL_3, URL_PART_PASSWORD, 0, "bar");
test_url_part(TEST_URL_3, URL_PART_SCHEME, 0, "http");
test_url_part(TEST_URL_3, URL_PART_QUERY, 0, "?query=x&return=y");
test_url_part(file_url, URL_PART_HOSTNAME, 0, "h o s t");
test_url_part(http_url, URL_PART_HOSTNAME, 0, "www.wine hq.org");
test_url_part(http_url, URL_PART_PASSWORD, 0, "pass 123");
}
/* ########################### */
......
......@@ -1856,7 +1856,8 @@ static LPCWSTR URL_ScanID(LPCWSTR start, LPDWORD size, WINE_URL_SCAN_TYPE type)
(*start == '_') ||
(*start == '+') ||
(*start == '-') ||
(*start == '.')) {
(*start == '.') ||
(*start == ' ')) {
start++;
(*size)++;
} else if (*start == '%') {
......@@ -1886,7 +1887,8 @@ static LPCWSTR URL_ScanID(LPCWSTR start, LPDWORD size, WINE_URL_SCAN_TYPE type)
while (cont) {
if (isalnumW(*start) ||
(*start == '-') ||
(*start == '.') ) {
(*start == '.') ||
(*start == ' ') ) {
start++;
(*size)++;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment