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
2ed570ec
Commit
2ed570ec
authored
Feb 22, 2010
by
Hans Leidekker
Committed by
Alexandre Julliard
Feb 22, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Fix handling of a response without headers.
parent
b467efb5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
5 deletions
+18
-5
http.c
dlls/wininet/http.c
+14
-1
http.c
dlls/wininet/tests/http.c
+4
-4
No files found.
dlls/wininet/http.c
View file @
2ed570ec
...
...
@@ -73,6 +73,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(wininet);
static
const
WCHAR
g_szHttp1_0
[]
=
{
'H'
,
'T'
,
'T'
,
'P'
,
'/'
,
'1'
,
'.'
,
'0'
,
0
};
static
const
WCHAR
g_szHttp1_1
[]
=
{
'H'
,
'T'
,
'T'
,
'P'
,
'/'
,
'1'
,
'.'
,
'1'
,
0
};
static
const
WCHAR
szOK
[]
=
{
'O'
,
'K'
,
0
};
static
const
WCHAR
szDefaultHeader
[]
=
{
'H'
,
'T'
,
'T'
,
'P'
,
'/'
,
'1'
,
'.'
,
'0'
,
' '
,
'2'
,
'0'
,
'0'
,
' '
,
'O'
,
'K'
,
0
};
static
const
WCHAR
hostW
[]
=
{
'H'
,
'o'
,
's'
,
't'
,
0
};
static
const
WCHAR
szAuthorization
[]
=
{
'A'
,
'u'
,
't'
,
'h'
,
'o'
,
'r'
,
'i'
,
'z'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
static
const
WCHAR
szProxy_Authorization
[]
=
{
'P'
,
'r'
,
'o'
,
'x'
,
'y'
,
'-'
,
'A'
,
'u'
,
't'
,
'h'
,
'o'
,
'r'
,
'i'
,
'z'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
...
...
@@ -4474,7 +4476,18 @@ static INT HTTP_GetResponseHeaders(http_request_t *lpwhr, BOOL clear)
}
else
if
(
!
codeHundred
)
{
FIXME
(
"Non status line at head of response (%s)
\n
"
,
debugstr_w
(
buffer
));
WARN
(
"No status line at head of response (%s)
\n
"
,
debugstr_w
(
buffer
));
HeapFree
(
GetProcessHeap
(),
0
,
lpwhr
->
lpszVersion
);
HeapFree
(
GetProcessHeap
(),
0
,
lpwhr
->
lpszStatusText
);
lpwhr
->
lpszVersion
=
heap_strdupW
(
g_szHttp1_0
);
lpwhr
->
lpszStatusText
=
heap_strdupW
(
szOK
);
HeapFree
(
GetProcessHeap
(),
0
,
lpwhr
->
lpszRawHeaders
);
lpwhr
->
lpszRawHeaders
=
heap_strdupW
(
szDefaultHeader
);
bSuccess
=
TRUE
;
goto
lend
;
}
}
while
(
codeHundred
);
...
...
dlls/wininet/tests/http.c
View file @
2ed570ec
...
...
@@ -2290,22 +2290,22 @@ static void test_response_without_headers(int port)
size
=
sizeof
(
buffer
);
SetLastError
(
0xdeadbeef
);
r
=
HttpQueryInfo
(
hr
,
HTTP_QUERY_STATUS_TEXT
,
buffer
,
&
size
,
NULL
);
todo_wine
ok
(
r
,
"HttpQueryInfo failed %u
\n
"
,
GetLastError
());
todo_wine
ok
(
!
strcmp
(
buffer
,
"OK"
),
"expected OK got:
\"
%s
\"\n
"
,
buffer
);
ok
(
r
,
"HttpQueryInfo failed %u
\n
"
,
GetLastError
());
ok
(
!
strcmp
(
buffer
,
"OK"
),
"expected OK got:
\"
%s
\"\n
"
,
buffer
);
buffer
[
0
]
=
0
;
size
=
sizeof
(
buffer
);
SetLastError
(
0xdeadbeef
);
r
=
HttpQueryInfo
(
hr
,
HTTP_QUERY_VERSION
,
buffer
,
&
size
,
NULL
);
ok
(
r
,
"HttpQueryInfo failed %u
\n
"
,
GetLastError
());
todo_wine
ok
(
!
strcmp
(
buffer
,
"HTTP/1.0"
),
"expected HTTP/1.0 got:
\"
%s
\"\n
"
,
buffer
);
ok
(
!
strcmp
(
buffer
,
"HTTP/1.0"
),
"expected HTTP/1.0 got:
\"
%s
\"\n
"
,
buffer
);
buffer
[
0
]
=
0
;
size
=
sizeof
(
buffer
);
SetLastError
(
0xdeadbeef
);
r
=
HttpQueryInfo
(
hr
,
HTTP_QUERY_RAW_HEADERS
,
buffer
,
&
size
,
NULL
);
ok
(
r
,
"HttpQueryInfo failed %u
\n
"
,
GetLastError
());
todo_wine
ok
(
!
strcmp
(
buffer
,
"HTTP/1.0 200 OK"
),
"raw headers wrong:
\"
%s
\"\n
"
,
buffer
);
ok
(
!
strcmp
(
buffer
,
"HTTP/1.0 200 OK"
),
"raw headers wrong:
\"
%s
\"\n
"
,
buffer
);
InternetCloseHandle
(
hr
);
InternetCloseHandle
(
hc
);
...
...
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