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
10389b27
Commit
10389b27
authored
Jul 19, 2013
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 19, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Ignore missing status text in response headers.
parent
3d759a0c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
5 deletions
+23
-5
http.c
dlls/wininet/http.c
+9
-5
http.c
dlls/wininet/tests/http.c
+14
-0
No files found.
dlls/wininet/http.c
View file @
10389b27
...
...
@@ -141,6 +141,8 @@ static const WCHAR szVia[] = { 'V','i','a',0 };
static
const
WCHAR
szWarning
[]
=
{
'W'
,
'a'
,
'r'
,
'n'
,
'i'
,
'n'
,
'g'
,
0
};
static
const
WCHAR
szWWW_Authenticate
[]
=
{
'W'
,
'W'
,
'W'
,
'-'
,
'A'
,
'u'
,
't'
,
'h'
,
'e'
,
'n'
,
't'
,
'i'
,
'c'
,
'a'
,
't'
,
'e'
,
0
};
static
const
WCHAR
emptyW
[]
=
{
0
};
#define HTTP_REFERER szReferer
#define HTTP_ACCEPT szAccept
#define HTTP_USERAGENT szUser_Agent
...
...
@@ -3874,6 +3876,8 @@ BOOL WINAPI HttpQueryInfoA(HINTERNET hHttpRequest, DWORD dwInfoLevel,
DWORD
len
;
WCHAR
*
bufferW
;
TRACE
(
"%p %x
\n
"
,
hHttpRequest
,
dwInfoLevel
);
if
((
dwInfoLevel
&
HTTP_QUERY_FLAG_NUMBER
)
||
(
dwInfoLevel
&
HTTP_QUERY_FLAG_SYSTEMTIME
))
{
...
...
@@ -5857,9 +5861,8 @@ static DWORD HTTP_GetResponseHeaders(http_request_t *request, INT *len)
/* split the status code from the status text */
status_text
=
strchrW
(
status_code
,
' '
);
if
(
!
status_text
)
goto
lend
;
*
status_text
++=
0
;
if
(
status_text
)
*
status_text
++=
0
;
request
->
status_code
=
atoiW
(
status_code
);
...
...
@@ -5891,11 +5894,12 @@ static DWORD HTTP_GetResponseHeaders(http_request_t *request, INT *len)
heap_free
(
request
->
statusText
);
request
->
version
=
heap_strdupW
(
buffer
);
request
->
statusText
=
heap_strdupW
(
status_text
);
request
->
statusText
=
heap_strdupW
(
status_text
?
status_text
:
emptyW
);
/* Restore the spaces */
*
(
status_code
-
1
)
=
' '
;
*
(
status_text
-
1
)
=
' '
;
if
(
status_text
)
*
(
status_text
-
1
)
=
' '
;
/* Parse each response line */
do
...
...
dlls/wininet/tests/http.c
View file @
10389b27
...
...
@@ -3590,6 +3590,20 @@ static const http_status_test_t http_status_tests[] = {
"
\r\n
x"
,
404
,
"Fail"
},
{
"HTTP/1.1 200
\r\n
"
"Content-Length: 1
\r\n
"
"
\r\n
x"
,
200
,
""
},
{
"HTTP/1.1 410
\r\n
"
"Content-Length: 1
\r\n
"
"
\r\n
x"
,
410
,
""
}
};
...
...
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