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
5240e40b
Commit
5240e40b
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: Store status code in http_request_t and use it in set_content_length.
parent
ebf406c1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
http.c
dlls/wininet/http.c
+6
-4
internet.h
dlls/wininet/internet.h
+1
-0
No files found.
dlls/wininet/http.c
View file @
5240e40b
...
...
@@ -2585,13 +2585,13 @@ static const data_stream_vtbl_t chunked_stream_vtbl = {
};
/* set the request content length based on the headers */
static
DWORD
set_content_length
(
http_request_t
*
request
,
DWORD
status_code
)
static
DWORD
set_content_length
(
http_request_t
*
request
)
{
static
const
WCHAR
szChunked
[]
=
{
'c'
,
'h'
,
'u'
,
'n'
,
'k'
,
'e'
,
'd'
,
0
};
WCHAR
encoding
[
20
];
DWORD
size
;
if
(
status_code
==
HTTP_STATUS_NO_CONTENT
)
{
if
(
request
->
status_code
==
HTTP_STATUS_NO_CONTENT
)
{
request
->
contentLength
=
request
->
netconn_stream
.
content_length
=
0
;
return
ERROR_SUCCESS
;
}
...
...
@@ -4826,7 +4826,7 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders,
&
dwStatusCode
,
&
dwBufferSize
,
NULL
)
!=
ERROR_SUCCESS
)
dwStatusCode
=
0
;
res
=
set_content_length
(
request
,
dwStatusCode
);
res
=
set_content_length
(
request
);
if
(
res
!=
ERROR_SUCCESS
)
goto
lend
;
if
(
!
request
->
contentLength
)
...
...
@@ -5000,7 +5000,7 @@ static DWORD HTTP_HttpEndRequestW(http_request_t *request, DWORD dwFlags, DWORD_
&
dwCode
,
&
dwCodeLength
,
NULL
)
!=
ERROR_SUCCESS
)
dwCode
=
0
;
if
((
res
=
set_content_length
(
request
,
dwCode
))
==
ERROR_SUCCESS
)
{
if
((
res
=
set_content_length
(
request
))
==
ERROR_SUCCESS
)
{
if
(
!
request
->
contentLength
)
http_release_netconn
(
request
,
TRUE
);
}
...
...
@@ -5692,6 +5692,8 @@ static INT HTTP_GetResponseHeaders(http_request_t *request, BOOL clear)
goto
lend
;
*
status_text
++=
0
;
request
->
status_code
=
atoiW
(
status_code
);
TRACE
(
"version [%s] status code [%s] status text [%s]
\n
"
,
debugstr_w
(
buffer
),
debugstr_w
(
status_code
),
debugstr_w
(
status_text
)
);
...
...
dlls/wininet/internet.h
View file @
5240e40b
...
...
@@ -312,6 +312,7 @@ typedef struct
DWORD
send_timeout
;
DWORD
receive_timeout
;
LPWSTR
version
;
DWORD
status_code
;
LPWSTR
statusText
;
DWORD
bytesToWrite
;
DWORD
bytesWritten
;
...
...
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