Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
22edb3e9
Commit
22edb3e9
authored
Nov 28, 2005
by
Robert Shearman
Committed by
Alexandre Julliard
Nov 28, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify HTTP_InsertProxyAuthorization.
parent
b9d77540
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
20 deletions
+10
-20
http.c
dlls/wininet/http.c
+10
-20
No files found.
dlls/wininet/http.c
View file @
22edb3e9
...
...
@@ -873,30 +873,20 @@ static LPWSTR HTTP_EncodeBasicAuth( LPCWSTR username, LPCWSTR password)
static
BOOL
HTTP_InsertProxyAuthorization
(
LPWININETHTTPREQW
lpwhr
,
LPCWSTR
username
,
LPCWSTR
password
)
{
HTTPHEADERW
hdr
;
INT
index
;
static
const
WCHAR
szProxyAuthorization
[]
=
{
'P'
,
'r'
,
'o'
,
'x'
,
'y'
,
'-'
,
'A'
,
'u'
,
't'
,
'h'
,
'o'
,
'r'
,
'i'
,
'z'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
hdr
.
lpszValue
=
HTTP_EncodeBasicAuth
(
username
,
password
);
hdr
.
lpszField
=
(
WCHAR
*
)
szProxyAuthorization
;
hdr
.
wFlags
=
HDR_ISREQUEST
;
hdr
.
wCount
=
0
;
if
(
!
hdr
.
lpszValue
)
WCHAR
*
authorization
=
HTTP_EncodeBasicAuth
(
username
,
password
);
BOOL
ret
;
if
(
!
authorization
)
return
FALSE
;
TRACE
(
"Inserting %s = %s
\n
"
,
debugstr_w
(
hdr
.
lpszField
),
debugstr_w
(
hdr
.
lpszValue
)
);
TRACE
(
"Inserting authorization: %s
\n
"
,
debugstr_w
(
authorization
)
);
/* remove the old proxy authorization header */
index
=
HTTP_GetCustomHeaderIndex
(
lpwhr
,
hdr
.
lpszField
);
if
(
index
>=
0
)
HTTP_DeleteCustomHeader
(
lpwhr
,
index
);
HTTP_InsertCustomHeader
(
lpwhr
,
&
hdr
);
HeapFree
(
GetProcessHeap
(),
0
,
hdr
.
lpszValue
);
ret
=
HTTP_ReplaceHeaderValue
(
&
lpwhr
->
StdHeaders
[
HTTP_QUERY_PROXY_AUTHORIZATION
],
authorization
);
HeapFree
(
GetProcessHeap
(),
0
,
authorization
);
return
TRUE
;
return
ret
;
}
/***********************************************************************
...
...
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