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
5a1a2631
Commit
5a1a2631
authored
Dec 01, 2008
by
Hans Leidekker
Committed by
Alexandre Julliard
Dec 02, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Append the extra info part in InternetCreateUrl{A, W}.
parent
af1f9ba3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
1 deletion
+34
-1
internet.c
dlls/wininet/internet.c
+10
-1
url.c
dlls/wininet/tests/url.c
+24
-0
No files found.
dlls/wininet/internet.c
View file @
5a1a2631
...
...
@@ -3487,6 +3487,9 @@ static BOOL calc_url_length(LPURL_COMPONENTSW lpUrlComponents,
if
(
lpUrlComponents
->
lpszUrlPath
)
*
lpdwUrlLength
+=
URL_GET_COMP_LENGTH
(
lpUrlComponents
,
UrlPath
);
if
(
lpUrlComponents
->
lpszExtraInfo
)
*
lpdwUrlLength
+=
URL_GET_COMP_LENGTH
(
lpUrlComponents
,
ExtraInfo
);
return
TRUE
;
}
...
...
@@ -3735,7 +3738,6 @@ BOOL WINAPI InternetCreateUrlW(LPURL_COMPONENTSW lpUrlComponents, DWORD dwFlags,
}
}
if
(
lpUrlComponents
->
lpszUrlPath
)
{
dwLen
=
URL_GET_COMP_LENGTH
(
lpUrlComponents
,
UrlPath
);
...
...
@@ -3743,6 +3745,13 @@ BOOL WINAPI InternetCreateUrlW(LPURL_COMPONENTSW lpUrlComponents, DWORD dwFlags,
lpszUrl
+=
dwLen
;
}
if
(
lpUrlComponents
->
lpszExtraInfo
)
{
dwLen
=
URL_GET_COMP_LENGTH
(
lpUrlComponents
,
ExtraInfo
);
memcpy
(
lpszUrl
,
lpUrlComponents
->
lpszExtraInfo
,
dwLen
*
sizeof
(
WCHAR
));
lpszUrl
+=
dwLen
;
}
*
lpszUrl
=
'\0'
;
return
TRUE
;
...
...
dlls/wininet/tests/url.c
View file @
5a1a2631
...
...
@@ -52,6 +52,7 @@
#define CREATE_URL10 "about://host/blank"
#define CREATE_URL11 "about:"
#define CREATE_URL12 "http://www.winehq.org:65535"
#define CREATE_URL13 "http://localhost/?test=123"
static
void
copy_compsA
(
URL_COMPONENTSA
*
src
,
...
...
@@ -455,9 +456,12 @@ static void InternetCreateUrlA_test(void)
http
[]
=
"http"
,
https
[]
=
"https"
,
winehq
[]
=
"www.winehq.org"
,
localhost
[]
=
"localhost"
,
username
[]
=
"username"
,
password
[]
=
"password"
,
root
[]
=
"/"
,
site_about
[]
=
"/site/about"
,
extra_info
[]
=
"?test=123"
,
about
[]
=
"about"
,
blank
[]
=
"blank"
,
host
[]
=
"host"
;
...
...
@@ -771,6 +775,26 @@ static void InternetCreateUrlA_test(void)
ok
(
!
strcmp
(
szUrl
,
CREATE_URL12
),
"Expected %s, got %s
\n
"
,
CREATE_URL12
,
szUrl
);
HeapFree
(
GetProcessHeap
(),
0
,
szUrl
);
memset
(
&
urlComp
,
0
,
sizeof
(
urlComp
));
urlComp
.
dwStructSize
=
sizeof
(
URL_COMPONENTS
);
urlComp
.
lpszScheme
=
http
;
urlComp
.
dwSchemeLength
=
strlen
(
urlComp
.
lpszScheme
);
urlComp
.
lpszHostName
=
localhost
;
urlComp
.
dwHostNameLength
=
strlen
(
urlComp
.
lpszHostName
);
urlComp
.
nPort
=
80
;
urlComp
.
lpszUrlPath
=
root
;
urlComp
.
dwUrlPathLength
=
strlen
(
urlComp
.
lpszUrlPath
);
urlComp
.
lpszExtraInfo
=
extra_info
;
urlComp
.
dwExtraInfoLength
=
strlen
(
urlComp
.
lpszExtraInfo
);
len
=
256
;
szUrl
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
InternetCreateUrlA
(
&
urlComp
,
ICU_ESCAPE
,
szUrl
,
&
len
);
ok
(
ret
,
"Expected success
\n
"
);
ok
(
len
==
strlen
(
CREATE_URL13
),
"Expected len %u, got %u
\n
"
,
strlen
(
CREATE_URL13
),
len
);
ok
(
!
strcmp
(
szUrl
,
CREATE_URL13
),
"Expected
\"
%s
\"
, got
\"
%s
\"\n
"
,
CREATE_URL13
,
szUrl
);
HeapFree
(
GetProcessHeap
(),
0
,
szUrl
);
}
START_TEST
(
url
)
...
...
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