Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
48e155ba
Commit
48e155ba
authored
Jun 30, 2010
by
Thomas Mullaly
Committed by
Alexandre Julliard
Jul 26, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon: Added parser for IPvFuture addresses.
parent
738d60c7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
77 additions
and
5 deletions
+77
-5
uri.c
dlls/urlmon/tests/uri.c
+29
-0
uri.c
dlls/urlmon/uri.c
+48
-5
No files found.
dlls/urlmon/tests/uri.c
View file @
48e155ba
...
...
@@ -1516,6 +1516,35 @@ static const uri_properties uri_tests[] = {
{
URL_SCHEME_HTTP
,
S_OK
,
FALSE
},
{
URLZONE_INVALID
,
E_NOTIMPL
,
FALSE
}
}
},
{
"http://[v2.34]/"
,
0
,
S_OK
,
FALSE
,
Uri_HAS_ABSOLUTE_URI
|
Uri_HAS_AUTHORITY
|
Uri_HAS_DISPLAY_URI
|
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
,
TRUE
,
{
{
"http://[v2.34]/"
,
S_OK
,
TRUE
},
{
"[v2.34]"
,
S_OK
,
TRUE
},
{
"http://[v2.34]/"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"[v2.34]"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
FALSE
},
{
"/"
,
S_OK
,
TRUE
},
{
"/"
,
S_OK
,
TRUE
},
{
""
,
S_FALSE
,
TRUE
},
{
"http://[v2.34]/"
,
S_OK
,
FALSE
},
{
"http"
,
S_OK
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
},
{
""
,
S_FALSE
,
FALSE
}
},
{
{
Uri_HOST_UNKNOWN
,
S_OK
,
TRUE
},
{
80
,
S_OK
,
TRUE
},
{
URL_SCHEME_HTTP
,
S_OK
,
FALSE
},
{
URLZONE_INVALID
,
E_NOTIMPL
,
FALSE
}
}
}
};
...
...
dlls/urlmon/uri.c
View file @
48e155ba
...
...
@@ -878,6 +878,49 @@ static BOOL parse_ipv6address(const WCHAR **ptr, parse_data *data, DWORD flags)
return
TRUE
;
}
/* IPvFuture = "v" 1*HEXDIG "." 1*( unreserved / sub-delims / ":" ) */
static
BOOL
parse_ipvfuture
(
const
WCHAR
**
ptr
,
parse_data
*
data
,
DWORD
flags
)
{
const
WCHAR
*
start
=
*
ptr
;
/* IPvFuture has to start with a 'v' or 'V'. */
if
(
**
ptr
!=
'v'
&&
**
ptr
!=
'V'
)
return
FALSE
;
/* Following the v their must be atleast 1 hexdigit. */
++
(
*
ptr
);
if
(
!
is_hexdigit
(
**
ptr
))
{
*
ptr
=
start
;
return
FALSE
;
}
++
(
*
ptr
);
while
(
is_hexdigit
(
**
ptr
))
++
(
*
ptr
);
/* End of the hexdigit sequence must be a '.' */
if
(
**
ptr
!=
'.'
)
{
*
ptr
=
start
;
return
FALSE
;
}
++
(
*
ptr
);
if
(
!
is_unreserved
(
**
ptr
)
&&
!
is_subdelim
(
**
ptr
)
&&
**
ptr
!=
':'
)
{
*
ptr
=
start
;
return
FALSE
;
}
++
(
*
ptr
);
while
(
is_unreserved
(
**
ptr
)
||
is_subdelim
(
**
ptr
)
||
**
ptr
==
':'
)
++
(
*
ptr
);
data
->
host_type
=
Uri_HOST_UNKNOWN
;
TRACE
(
"(%p %p %x): Parsed IPvFuture address %s len=%d
\n
"
,
ptr
,
data
,
flags
,
debugstr_wn
(
start
,
*
ptr
-
start
),
*
ptr
-
start
);
return
TRUE
;
}
/* IP-literal = "[" ( IPv6address / IPvFuture ) "]" */
static
BOOL
parse_ip_literal
(
const
WCHAR
**
ptr
,
parse_data
*
data
,
DWORD
flags
)
{
data
->
host
=
*
ptr
;
...
...
@@ -889,11 +932,11 @@ static BOOL parse_ip_literal(const WCHAR **ptr, parse_data *data, DWORD flags) {
++
(
*
ptr
);
if
(
!
parse_ipv6address
(
ptr
,
data
,
flags
))
{
WARN
(
"(%p %p %x): IPvFuture addresses are not supported yet.
\n
"
,
ptr
,
data
,
flags
)
;
*
ptr
=
data
->
host
;
data
->
host
=
NULL
;
return
FALSE
;
if
(
!
parse_ipvfuture
(
ptr
,
data
,
flags
))
{
*
ptr
=
data
->
host
;
data
->
host
=
NULL
;
return
FALSE
;
}
}
if
(
**
ptr
!=
']'
)
{
...
...
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