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
fa4c25dd
Commit
fa4c25dd
authored
Jul 22, 2009
by
Hans Leidekker
Committed by
Alexandre Julliard
Jul 22, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Correct handling of redirected HEAD requests.
parent
336ee286
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
7 deletions
+12
-7
http.c
dlls/wininet/http.c
+12
-7
No files found.
dlls/wininet/http.c
View file @
fa4c25dd
...
...
@@ -79,6 +79,7 @@ static const WCHAR szProxy_Authorization[] = { 'P','r','o','x','y','-','A','u','
static
const
WCHAR
szStatus
[]
=
{
'S'
,
't'
,
'a'
,
't'
,
'u'
,
's'
,
0
};
static
const
WCHAR
szKeepAlive
[]
=
{
'K'
,
'e'
,
'e'
,
'p'
,
'-'
,
'A'
,
'l'
,
'i'
,
'v'
,
'e'
,
0
};
static
const
WCHAR
szGET
[]
=
{
'G'
,
'E'
,
'T'
,
0
};
static
const
WCHAR
szHEAD
[]
=
{
'H'
,
'E'
,
'A'
,
'D'
,
0
};
static
const
WCHAR
szCrLf
[]
=
{
'\r'
,
'\n'
,
0
};
static
const
WCHAR
szAccept
[]
=
{
'A'
,
'c'
,
'c'
,
'e'
,
'p'
,
't'
,
0
};
...
...
@@ -909,9 +910,11 @@ static BOOL HTTP_HttpEndRequestW(http_request_t *lpwhr, DWORD dwFlags, DWORD_PTR
dwBufferSize
=
sizeof
(
szNewLocation
);
if
(
HTTP_HttpQueryInfoW
(
lpwhr
,
HTTP_QUERY_LOCATION
,
szNewLocation
,
&
dwBufferSize
,
NULL
))
{
/* redirects are always GETs */
HeapFree
(
GetProcessHeap
(),
0
,
lpwhr
->
lpszVerb
);
lpwhr
->
lpszVerb
=
heap_strdupW
(
szGET
);
if
(
strcmpW
(
lpwhr
->
lpszVerb
,
szGET
)
&&
strcmpW
(
lpwhr
->
lpszVerb
,
szHEAD
))
{
HeapFree
(
GetProcessHeap
(),
0
,
lpwhr
->
lpszVerb
);
lpwhr
->
lpszVerb
=
heap_strdupW
(
szGET
);
}
HTTP_DrainContent
(
lpwhr
);
if
((
new_url
=
HTTP_GetRedirectURL
(
lpwhr
,
szNewLocation
)))
{
...
...
@@ -2526,6 +2529,7 @@ static void HTTP_DrainContent(http_request_t *req)
NETCON_close
(
&
req
->
netConnection
);
return
;
}
if
(
!
strcmpW
(
req
->
lpszVerb
,
szHEAD
))
return
;
do
{
...
...
@@ -3790,10 +3794,11 @@ BOOL WINAPI HTTP_HttpSendRequestW(http_request_t *lpwhr, LPCWSTR lpszHeaders,
if
((
dwStatusCode
==
HTTP_STATUS_REDIRECT
||
dwStatusCode
==
HTTP_STATUS_MOVED
)
&&
HTTP_HttpQueryInfoW
(
lpwhr
,
HTTP_QUERY_LOCATION
,
szNewLocation
,
&
dwBufferSize
,
NULL
))
{
/* redirects are always GETs */
HeapFree
(
GetProcessHeap
(),
0
,
lpwhr
->
lpszVerb
);
lpwhr
->
lpszVerb
=
heap_strdupW
(
szGET
);
if
(
strcmpW
(
lpwhr
->
lpszVerb
,
szGET
)
&&
strcmpW
(
lpwhr
->
lpszVerb
,
szHEAD
))
{
HeapFree
(
GetProcessHeap
(),
0
,
lpwhr
->
lpszVerb
);
lpwhr
->
lpszVerb
=
heap_strdupW
(
szGET
);
}
HTTP_DrainContent
(
lpwhr
);
if
((
new_url
=
HTTP_GetRedirectURL
(
lpwhr
,
szNewLocation
)))
{
...
...
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