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
c8dfc02b
Commit
c8dfc02b
authored
Jul 26, 2007
by
Aric Stewart
Committed by
Alexandre Julliard
Jul 27, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Strip Accept-Encoding from http/1.0 requests.
parent
510c4dc7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
http.c
dlls/wininet/http.c
+21
-0
No files found.
dlls/wininet/http.c
View file @
c8dfc02b
...
...
@@ -118,6 +118,7 @@ static BOOL WINAPI HTTP_HttpQueryInfoW( LPWININETHTTPREQW lpwhr, DWORD
lpdwIndex
);
static
BOOL
HTTP_HandleRedirect
(
LPWININETHTTPREQW
lpwhr
,
LPCWSTR
lpszUrl
);
static
UINT
HTTP_DecodeBase64
(
LPCWSTR
base64
,
LPSTR
bin
);
static
BOOL
HTTP_VerifyValidHeader
(
LPWININETHTTPREQW
lpwhr
,
LPCWSTR
field
);
LPHTTPHEADERW
HTTP_GetHeader
(
LPWININETHTTPREQW
req
,
LPCWSTR
head
)
...
...
@@ -636,6 +637,8 @@ static BOOL WINAPI HTTP_HttpAddRequestHeadersW(LPWININETHTTPREQW lpwhr,
pFieldAndValue
=
HTTP_InterpretHttpHeader
(
lpszStart
);
if
(
pFieldAndValue
)
{
bSuccess
=
HTTP_VerifyValidHeader
(
lpwhr
,
pFieldAndValue
[
0
]);
if
(
bSuccess
)
bSuccess
=
HTTP_ProcessHeader
(
lpwhr
,
pFieldAndValue
[
0
],
pFieldAndValue
[
1
],
dwModifier
|
HTTP_ADDHDR_FLAG_REQ
);
HTTP_FreeTokens
(
pFieldAndValue
);
...
...
@@ -3516,6 +3519,24 @@ static BOOL HTTP_DeleteCustomHeader(LPWININETHTTPREQW lpwhr, DWORD index)
return
TRUE
;
}
/***********************************************************************
* HTTP_VerifyValidHeader (internal)
*
* Verify the given header is not invalid for the given http request
*
*/
static
BOOL
HTTP_VerifyValidHeader
(
LPWININETHTTPREQW
lpwhr
,
LPCWSTR
field
)
{
BOOL
rc
=
TRUE
;
/* Accept-Encoding is stripped from HTTP/1.0 requests. It is invalid */
if
(
strcmpiW
(
field
,
szAccept_Encoding
)
==
0
)
return
FALSE
;
return
rc
;
}
/***********************************************************************
* IsHostInProxyBypassList (@)
*
...
...
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