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
aec0e93d
Commit
aec0e93d
authored
May 09, 2008
by
Hans Leidekker
Committed by
Alexandre Julliard
May 12, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Don't overwrite content length header in HttpSendRequest.
parent
eb18ce9d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
1 deletion
+29
-1
http.c
dlls/wininet/http.c
+1
-1
http.c
dlls/wininet/tests/http.c
+28
-0
No files found.
dlls/wininet/http.c
View file @
aec0e93d
...
...
@@ -3171,7 +3171,7 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders,
if
(
dwContentLength
||
!
strcmpW
(
lpwhr
->
lpszVerb
,
szPost
))
{
sprintfW
(
contentLengthStr
,
szContentLength
,
dwContentLength
);
HTTP_HttpAddRequestHeadersW
(
lpwhr
,
contentLengthStr
,
-
1L
,
HTTP_ADDREQ_FLAG_ADD
|
HTTP_ADDHDR_FLAG_REPLACE
);
HTTP_HttpAddRequestHeadersW
(
lpwhr
,
contentLengthStr
,
-
1L
,
HTTP_ADDREQ_FLAG_ADD
_IF_NEW
);
}
if
(
lpwhr
->
lpHttpSession
->
lpAppInfo
->
lpszAgent
)
{
...
...
dlls/wininet/tests/http.c
View file @
aec0e93d
...
...
@@ -1452,6 +1452,17 @@ static DWORD CALLBACK server_thread(LPVOID param)
send
(
c
,
page1
,
sizeof
page1
-
1
,
0
);
}
if
(
strstr
(
buffer
,
"POST /test7"
))
{
if
(
strstr
(
buffer
,
"Content-Length: 100"
))
{
send
(
c
,
okmsg
,
sizeof
okmsg
-
1
,
0
);
send
(
c
,
page1
,
sizeof
page1
-
1
,
0
);
}
else
send
(
c
,
notokmsg
,
sizeof
notokmsg
-
1
,
0
);
}
if
(
strstr
(
buffer
,
"GET /quit"
))
{
send
(
c
,
okmsg
,
sizeof
okmsg
-
1
,
0
);
...
...
@@ -1654,6 +1665,23 @@ static void test_header_handling_order(int port)
ok
(
status
==
200
,
"request failed with status %u
\n
"
,
status
);
InternetCloseHandle
(
request
);
request
=
HttpOpenRequest
(
connect
,
"POST"
,
"/test7"
,
NULL
,
NULL
,
types
,
INTERNET_FLAG_KEEP_CONNECTION
,
0
);
ok
(
request
!=
NULL
,
"HttpOpenRequest failed
\n
"
);
ret
=
HttpAddRequestHeaders
(
request
,
"Content-Length: 100
\r\n
"
,
~
0UL
,
HTTP_ADDREQ_FLAG_ADD_IF_NEW
);
ok
(
ret
,
"HttpAddRequestHeaders failed
\n
"
);
ret
=
HttpSendRequest
(
request
,
connection
,
~
0UL
,
NULL
,
0
);
ok
(
ret
,
"HttpSendRequest failed
\n
"
);
status
=
0
;
size
=
sizeof
(
status
);
ret
=
HttpQueryInfo
(
request
,
HTTP_QUERY_STATUS_CODE
|
HTTP_QUERY_FLAG_NUMBER
,
&
status
,
&
size
,
NULL
);
ok
(
ret
,
"HttpQueryInfo failed
\n
"
);
ok
(
status
==
200
,
"request failed with status %u
\n
"
,
status
);
InternetCloseHandle
(
request
);
InternetCloseHandle
(
connect
);
InternetCloseHandle
(
session
);
}
...
...
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