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
797a17bb
Commit
797a17bb
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_HttpEndRequestW.
parent
4cf3f785
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
29 deletions
+24
-29
http.c
dlls/wininet/http.c
+24
-29
No files found.
dlls/wininet/http.c
View file @
797a17bb
...
...
@@ -4964,9 +4964,8 @@ static void AsyncHttpSendRequestProc(WORKREQUEST *workRequest)
static
DWORD
HTTP_HttpEndRequestW
(
http_request_t
*
request
,
DWORD
dwFlags
,
DWORD_PTR
dwContext
)
{
INT
responseLen
;
DWORD
dwCode
,
dwCodeLength
;
DWORD
dwBufferSize
;
INT
responseLen
;
DWORD
res
=
ERROR_SUCCESS
;
if
(
!
request
->
netconn
)
{
...
...
@@ -4991,11 +4990,6 @@ static DWORD HTTP_HttpEndRequestW(http_request_t *request, DWORD dwFlags, DWORD_
HTTP_ProcessExpires
(
request
);
HTTP_ProcessLastModified
(
request
);
dwCodeLength
=
sizeof
(
dwCode
);
if
(
HTTP_HttpQueryInfoW
(
request
,
HTTP_QUERY_FLAG_NUMBER
|
HTTP_QUERY_STATUS_CODE
,
&
dwCode
,
&
dwCodeLength
,
NULL
)
!=
ERROR_SUCCESS
)
dwCode
=
0
;
if
((
res
=
set_content_length
(
request
))
==
ERROR_SUCCESS
)
{
if
(
!
request
->
contentLength
)
http_release_netconn
(
request
,
TRUE
);
...
...
@@ -5003,32 +4997,33 @@ static DWORD HTTP_HttpEndRequestW(http_request_t *request, DWORD dwFlags, DWORD_
if
(
res
==
ERROR_SUCCESS
&&
!
(
request
->
hdr
.
dwFlags
&
INTERNET_FLAG_NO_AUTO_REDIRECT
))
{
if
(
dwCode
==
HTTP_STATUS_REDIRECT
||
dwCode
==
HTTP_STATUS_MOVED
||
dwCode
==
HTTP_STATUS_REDIRECT_METHOD
||
dwCode
==
HTTP_STATUS_REDIRECT_KEEP_VERB
)
{
switch
(
request
->
status_code
)
{
case
HTTP_STATUS_REDIRECT
:
case
HTTP_STATUS_MOVED
:
case
HTTP_STATUS_REDIRECT_METHOD
:
case
HTTP_STATUS_REDIRECT_KEEP_VERB
:
{
WCHAR
*
new_url
,
szNewLocation
[
INTERNET_MAX_URL_LENGTH
];
dwBufferSize
=
sizeof
(
szNewLocation
);
if
(
HTTP_HttpQueryInfoW
(
request
,
HTTP_QUERY_LOCATION
,
szNewLocation
,
&
dwBufferSize
,
NULL
)
==
ERROR_SUCCESS
)
if
(
HTTP_HttpQueryInfoW
(
request
,
HTTP_QUERY_LOCATION
,
szNewLocation
,
&
dwBufferSize
,
NULL
)
!=
ERROR_SUCCESS
)
break
;
if
(
strcmpW
(
request
->
verb
,
szGET
)
&&
strcmpW
(
request
->
verb
,
szHEAD
)
&&
request
->
status_code
!=
HTTP_STATUS_REDIRECT_KEEP_VERB
)
{
if
(
strcmpW
(
request
->
verb
,
szGET
)
&&
strcmpW
(
request
->
verb
,
szHEAD
)
&&
dwCode
!=
HTTP_STATUS_REDIRECT_KEEP_VERB
)
{
heap_free
(
request
->
verb
);
request
->
verb
=
heap_strdupW
(
szGET
);
}
drain_content
(
request
);
if
((
new_url
=
HTTP_GetRedirectURL
(
request
,
szNewLocation
)))
{
INTERNET_SendCallback
(
&
request
->
hdr
,
request
->
hdr
.
dwContext
,
INTERNET_STATUS_REDIRECT
,
new_url
,
(
strlenW
(
new_url
)
+
1
)
*
sizeof
(
WCHAR
));
res
=
HTTP_HandleRedirect
(
request
,
new_url
);
if
(
res
==
ERROR_SUCCESS
)
res
=
HTTP_HttpSendRequestW
(
request
,
NULL
,
0
,
NULL
,
0
,
0
,
TRUE
);
heap_free
(
new_url
);
}
heap_free
(
request
->
verb
);
request
->
verb
=
heap_strdupW
(
szGET
);
}
drain_content
(
request
);
if
((
new_url
=
HTTP_GetRedirectURL
(
request
,
szNewLocation
)))
{
INTERNET_SendCallback
(
&
request
->
hdr
,
request
->
hdr
.
dwContext
,
INTERNET_STATUS_REDIRECT
,
new_url
,
(
strlenW
(
new_url
)
+
1
)
*
sizeof
(
WCHAR
));
res
=
HTTP_HandleRedirect
(
request
,
new_url
);
if
(
res
==
ERROR_SUCCESS
)
res
=
HTTP_HttpSendRequestW
(
request
,
NULL
,
0
,
NULL
,
0
,
0
,
TRUE
);
heap_free
(
new_url
);
}
}
}
}
...
...
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