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
4cf3f785
Commit
4cf3f785
authored
May 03, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
May 03, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Use stored status code in HTTP_HttpSendRequestW.
parent
5240e40b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
15 deletions
+11
-15
http.c
dlls/wininet/http.c
+11
-15
No files found.
dlls/wininet/http.c
View file @
4cf3f785
...
...
@@ -4797,7 +4797,6 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders,
if
(
bEndRequest
)
{
DWORD
dwBufferSize
;
DWORD
dwStatusCode
;
INTERNET_SendCallback
(
&
request
->
hdr
,
request
->
hdr
.
dwContext
,
INTERNET_STATUS_RECEIVING_RESPONSE
,
NULL
,
0
);
...
...
@@ -4821,11 +4820,6 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders,
HTTP_ProcessExpires
(
request
);
HTTP_ProcessLastModified
(
request
);
dwBufferSize
=
sizeof
(
dwStatusCode
);
if
(
HTTP_HttpQueryInfoW
(
request
,
HTTP_QUERY_FLAG_NUMBER
|
HTTP_QUERY_STATUS_CODE
,
&
dwStatusCode
,
&
dwBufferSize
,
NULL
)
!=
ERROR_SUCCESS
)
dwStatusCode
=
0
;
res
=
set_content_length
(
request
);
if
(
res
!=
ERROR_SUCCESS
)
goto
lend
;
...
...
@@ -4836,14 +4830,16 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders,
{
WCHAR
*
new_url
,
szNewLocation
[
INTERNET_MAX_URL_LENGTH
];
dwBufferSize
=
sizeof
(
szNewLocation
);
if
((
dwStatusCode
==
HTTP_STATUS_REDIRECT
||
dwStatusCode
==
HTTP_STATUS_MOVED
||
dwStatusCode
==
HTTP_STATUS_REDIRECT_KEEP_VERB
||
dwStatusCode
==
HTTP_STATUS_REDIRECT_METHOD
)
&&
HTTP_HttpQueryInfoW
(
request
,
HTTP_QUERY_LOCATION
,
szNewLocation
,
&
dwBufferSize
,
NULL
)
==
ERROR_SUCCESS
)
{
switch
(
request
->
status_code
)
{
case
HTTP_STATUS_REDIRECT
:
case
HTTP_STATUS_MOVED
:
case
HTTP_STATUS_REDIRECT_KEEP_VERB
:
case
HTTP_STATUS_REDIRECT_METHOD
:
if
(
HTTP_HttpQueryInfoW
(
request
,
HTTP_QUERY_LOCATION
,
szNewLocation
,
&
dwBufferSize
,
NULL
)
!=
ERROR_SUCCESS
)
break
;
if
(
strcmpW
(
request
->
verb
,
szGET
)
&&
strcmpW
(
request
->
verb
,
szHEAD
)
&&
dwStatusC
ode
!=
HTTP_STATUS_REDIRECT_KEEP_VERB
)
request
->
status_c
ode
!=
HTTP_STATUS_REDIRECT_KEEP_VERB
)
{
heap_free
(
request
->
verb
);
request
->
verb
=
heap_strdupW
(
szGET
);
...
...
@@ -4868,7 +4864,7 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders,
{
WCHAR
szAuthValue
[
2048
];
dwBufferSize
=
2048
;
if
(
dwStatusC
ode
==
HTTP_STATUS_DENIED
)
if
(
request
->
status_c
ode
==
HTTP_STATUS_DENIED
)
{
LPHTTPHEADERW
Host
=
HTTP_GetHeader
(
request
,
hostW
);
DWORD
dwIndex
=
0
;
...
...
@@ -4892,7 +4888,7 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders,
request
->
authInfo
=
NULL
;
}
}
if
(
dwStatusC
ode
==
HTTP_STATUS_PROXY_AUTH_REQ
)
if
(
request
->
status_c
ode
==
HTTP_STATUS_PROXY_AUTH_REQ
)
{
DWORD
dwIndex
=
0
;
while
(
HTTP_HttpQueryInfoW
(
request
,
HTTP_QUERY_PROXY_AUTHENTICATE
,
szAuthValue
,
&
dwBufferSize
,
&
dwIndex
)
==
ERROR_SUCCESS
)
...
...
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