Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
e06d49ff
Commit
e06d49ff
authored
Mar 13, 2011
by
Thomas Mullaly
Committed by
Alexandre Julliard
Mar 29, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Added basic domain zone support to MapUrlToZone.
parent
1b625bb1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
15 deletions
+17
-15
sec_mgr.c
dlls/urlmon/sec_mgr.c
+0
-0
sec_mgr.c
dlls/urlmon/tests/sec_mgr.c
+14
-14
uri.c
dlls/urlmon/uri.c
+1
-1
urlmon_main.h
dlls/urlmon/urlmon_main.h
+2
-0
No files found.
dlls/urlmon/sec_mgr.c
View file @
e06d49ff
This diff is collapsed.
Click to expand it.
dlls/urlmon/tests/sec_mgr.c
View file @
e06d49ff
...
...
@@ -498,7 +498,7 @@ static void test_zone_domain_cache(void)
zone
=
URLZONE_INVALID
;
hres
=
IInternetSecurityManager_MapUrlToZone
(
secmgr
,
testing_domain_urlW
,
&
zone
,
0
);
ok
(
hres
==
S_OK
,
"MapUrlToZone failed: %08x
\n
"
,
hres
);
ok
(
zone
==
URLZONE_INTERNET
,
"Got %d, expected URLZONE_INTERNET
\n
"
,
zone
);
todo_wine
ok
(
zone
==
URLZONE_INTERNET
,
"Got %d, expected URLZONE_INTERNET
\n
"
,
zone
);
/* FIXME: Play nice with ZoneMaps that existed before the test is run. */
res
=
RegDeleteKeyA
(
domains
,
"testing.domain"
);
...
...
@@ -655,30 +655,30 @@ typedef struct {
static
const
zone_mapping_test
zone_mapping_tests
[]
=
{
/* Tests for "yabadaba.do" zone mappings. */
{
"http://yabadaba.do/"
,
URLZONE_CUSTOM
,
TRUE
},
{
"http://google.yabadaba.do/"
,
URLZONE_CUSTOM
,
TRUE
},
{
"http://yabadaba.do/"
,
URLZONE_CUSTOM
},
{
"http://google.yabadaba.do/"
,
URLZONE_CUSTOM
},
{
"zip://yabadaba.do/"
,
URLZONE_INTERNET
},
/* Tests for "super.cool" zone mappings. */
{
"ftp://testing.google.super.cool/"
,
URLZONE_INTERNET
},
{
"ftp://testing.*.super.cool/"
,
URLZONE_CUSTOM2
,
TRUE
},
{
"ftp://google.testing.super.cool/"
,
URLZONE_CUSTOM2
,
TRUE
},
{
"ftp://testing.*.super.cool/"
,
URLZONE_CUSTOM2
},
{
"ftp://google.testing.super.cool/"
,
URLZONE_CUSTOM2
},
/* Tests for "tests.test" zone mappings. */
{
"http://tests.test/"
,
URLZONE_CUSTOM
,
TRUE
},
{
"http://www.tests.test/"
,
URLZONE_CUSTOM
,
TRUE
},
{
"ftp://tests.test/"
,
URLZONE_CUSTOM
,
TRUE
},
{
"ftp://www.tests.test/"
,
URLZONE_CUSTOM
,
TRUE
},
{
"http://tests.test/"
,
URLZONE_CUSTOM
},
{
"http://www.tests.test/"
,
URLZONE_CUSTOM
},
{
"ftp://tests.test/"
,
URLZONE_CUSTOM
},
{
"ftp://www.tests.test/"
,
URLZONE_CUSTOM
},
{
"test://www.tests.test/"
,
URLZONE_INTERNET
},
{
"test://tests.test/"
,
URLZONE_INTERNET
},
{
"zip://www.tests.test/"
,
URLZONE_INTERNET
},
{
"zip://tests.test/"
,
URLZONE_INTERNET
},
/* Tests for "www.testing.com" zone mappings. */
{
"http://google.www.testing.com/"
,
URLZONE_INTERNET
},
{
"http://www.testing.com/"
,
URLZONE_CUSTOM
,
TRU
E
,
URLZONE_INTERNET
},
{
"http://testing.www.testing.com/"
,
URLZONE_CUSTOM2
,
TRU
E
,
URLZONE_INTERNET
},
{
"http://www.testing.com/"
,
URLZONE_CUSTOM
,
FALS
E
,
URLZONE_INTERNET
},
{
"http://testing.www.testing.com/"
,
URLZONE_CUSTOM2
,
FALS
E
,
URLZONE_INTERNET
},
/* Tests for "org" zone mappings. */
{
"http://google.org/"
,
URLZONE_INTERNET
,
FALSE
,
URLZONE_CUSTOM
},
{
"http://org/"
,
URLZONE_CUSTOM
,
TRUE
},
{
"http://testing.org/"
,
URLZONE_CUSTOM2
,
TRUE
}
{
"http://org/"
,
URLZONE_CUSTOM
},
{
"http://testing.org/"
,
URLZONE_CUSTOM2
}
};
static
void
test_zone_domain_mappings
(
void
)
...
...
@@ -701,7 +701,7 @@ static void test_zone_domain_mappings(void)
hres
=
IInternetSecurityManager_MapUrlToZone
(
secmgr
,
local_machineW
,
&
zone
,
0
);
ok
(
hres
==
S_OK
,
"MapUrlToZone failed: %08x
\n
"
,
hres
);
todo_wine
ok
(
zone
==
URLZONE_CUSTOM
,
"Expected URLZONE_CUSTOM, but got %d
\n
"
,
zone
);
ok
(
zone
==
URLZONE_CUSTOM
,
"Expected URLZONE_CUSTOM, but got %d
\n
"
,
zone
);
RegCloseKey
(
domains
);
}
...
...
dlls/urlmon/uri.c
View file @
e06d49ff
...
...
@@ -607,7 +607,7 @@ static inline void pct_encode_val(WCHAR val, WCHAR *dest) {
* It's implied that if there is a domain name its range is:
* [host+domain_start, host+host_len).
*/
static
void
find_domain_name
(
const
WCHAR
*
host
,
DWORD
host_len
,
void
find_domain_name
(
const
WCHAR
*
host
,
DWORD
host_len
,
INT
*
domain_start
)
{
const
WCHAR
*
last_tld
,
*
sec_last_tld
,
*
end
;
...
...
dlls/urlmon/urlmon_main.h
View file @
e06d49ff
...
...
@@ -149,6 +149,8 @@ HRESULT protocol_unlock_request(Protocol*);
HRESULT
protocol_abort
(
Protocol
*
,
HRESULT
);
void
protocol_close_connection
(
Protocol
*
);
void
find_domain_name
(
const
WCHAR
*
,
DWORD
,
INT
*
);
typedef
struct
{
IInternetProtocol
IInternetProtocol_iface
;
IInternetProtocolSink
IInternetProtocolSink_iface
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment