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
76598823
Commit
76598823
authored
Oct 04, 2001
by
Nikolas Zimmermann
Committed by
Alexandre Julliard
Oct 04, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Skip port number before calling gethostbyname.
Fix non-absolute urls.
parent
f26d2522
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
1 deletion
+29
-1
http.c
dlls/wininet/http.c
+9
-0
utility.c
dlls/wininet/utility.c
+20
-1
No files found.
dlls/wininet/http.c
View file @
76598823
...
...
@@ -605,6 +605,15 @@ BOOL WINAPI HTTP_HttpSendRequestA(HINTERNET hHttpRequest, LPCSTR lpszHeaders,
if
(
NULL
==
lpwhr
->
lpszPath
)
lpwhr
->
lpszPath
=
HTTP_strdup
(
"/"
);
if
(
lpwhr
->
lpszPath
[
0
]
!=
'/'
)
/* not an absolute path ?? --> fix it !! */
{
char
*
fixurl
=
HeapAlloc
(
GetProcessHeap
(),
0
,
strlen
(
lpwhr
->
lpszPath
)
+
2
);
*
fixurl
=
'/'
;
strcpy
(
fixurl
+
1
,
lpwhr
->
lpszPath
);
HeapFree
(
GetProcessHeap
(),
0
,
lpwhr
->
lpszPath
);
lpwhr
->
lpszPath
=
fixurl
;
}
/* Calculate length of request string */
requestStringLen
=
strlen
(
lpwhr
->
lpszVerb
)
+
...
...
dlls/wininet/utility.c
View file @
76598823
...
...
@@ -113,9 +113,28 @@ time_t ConvertTimeString(LPCSTR asctime)
BOOL
GetAddress
(
LPCSTR
lpszServerName
,
INTERNET_PORT
nServerPort
,
struct
hostent
**
phe
,
struct
sockaddr_in
*
psa
)
{
char
*
found
;
TRACE
(
"%s
\n
"
,
lpszServerName
);
*
phe
=
gethostbyname
(
lpszServerName
);
/* Validate server name first
* Check if there is sth. like
* pinger.macromedia.com:80
* if yes, eliminate the :80....
*/
found
=
strchr
(
lpszServerName
,
':'
);
if
(
found
)
{
int
len
=
found
-
lpszServerName
;
char
*
new
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
+
1
);
memcpy
(
new
,
lpszServerName
,
len
);
new
[
len
]
=
'\0'
;
TRACE
(
"Found a ':' inside the server name, reparsed name: %s
\n
"
,
new
);
*
phe
=
gethostbyname
(
new
);
HeapFree
(
GetProcessHeap
(),
0
,
new
);
}
else
*
phe
=
gethostbyname
(
lpszServerName
);
if
(
NULL
==
*
phe
)
{
TRACE
(
"Failed to get hostname: (%s)
\n
"
,
lpszServerName
);
...
...
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