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
d0033dba
Commit
d0033dba
authored
Feb 17, 2008
by
Hans Leidekker
Committed by
Alexandre Julliard
Feb 18, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Honour the version override in HttpOpenRequest.
parent
cca635b4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
+13
-7
http.c
dlls/wininet/http.c
+13
-7
No files found.
dlls/wininet/http.c
View file @
d0033dba
...
@@ -62,7 +62,7 @@
...
@@ -62,7 +62,7 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
wininet
);
WINE_DEFAULT_DEBUG_CHANNEL
(
wininet
);
static
const
WCHAR
g_szHttp1_1
[]
=
{
'
'
,
'H'
,
'T'
,
'T'
,
'P'
,
'/'
,
'1'
,
'.'
,
'1'
,
0
};
static
const
WCHAR
g_szHttp1_1
[]
=
{
'
H'
,
'T'
,
'T'
,
'P'
,
'/'
,
'1'
,
'.'
,
'1'
,
0
};
static
const
WCHAR
g_szReferer
[]
=
{
'R'
,
'e'
,
'f'
,
'e'
,
'r'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
g_szReferer
[]
=
{
'R'
,
'e'
,
'f'
,
'e'
,
'r'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
g_szAccept
[]
=
{
'A'
,
'c'
,
'c'
,
'e'
,
'p'
,
't'
,
0
};
static
const
WCHAR
g_szAccept
[]
=
{
'A'
,
'c'
,
'c'
,
'e'
,
'p'
,
't'
,
0
};
static
const
WCHAR
g_szUserAgent
[]
=
{
'U'
,
's'
,
'e'
,
'r'
,
'-'
,
'A'
,
'g'
,
'e'
,
'n'
,
't'
,
0
};
static
const
WCHAR
g_szUserAgent
[]
=
{
'U'
,
's'
,
'e'
,
'r'
,
'-'
,
'A'
,
'g'
,
'e'
,
'n'
,
't'
,
0
};
...
@@ -247,7 +247,7 @@ static void HTTP_FixURL( LPWININETHTTPREQW lpwhr)
...
@@ -247,7 +247,7 @@ static void HTTP_FixURL( LPWININETHTTPREQW lpwhr)
}
}
}
}
static
LPWSTR
HTTP_BuildHeaderRequestString
(
LPWININETHTTPREQW
lpwhr
,
LPCWSTR
verb
,
LPCWSTR
path
)
static
LPWSTR
HTTP_BuildHeaderRequestString
(
LPWININETHTTPREQW
lpwhr
,
LPCWSTR
verb
,
LPCWSTR
path
,
LPCWSTR
version
)
{
{
LPWSTR
requestString
;
LPWSTR
requestString
;
DWORD
len
,
n
;
DWORD
len
,
n
;
...
@@ -261,7 +261,7 @@ static LPWSTR HTTP_BuildHeaderRequestString( LPWININETHTTPREQW lpwhr, LPCWSTR ve
...
@@ -261,7 +261,7 @@ static LPWSTR HTTP_BuildHeaderRequestString( LPWININETHTTPREQW lpwhr, LPCWSTR ve
static
const
WCHAR
sztwocrlf
[]
=
{
'\r'
,
'\n'
,
'\r'
,
'\n'
,
0
};
static
const
WCHAR
sztwocrlf
[]
=
{
'\r'
,
'\n'
,
'\r'
,
'\n'
,
0
};
/* allocate space for an array of all the string pointers to be added */
/* allocate space for an array of all the string pointers to be added */
len
=
(
lpwhr
->
nCustHeaders
)
*
4
+
9
;
len
=
(
lpwhr
->
nCustHeaders
)
*
4
+
10
;
req
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
LPCWSTR
)
);
req
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
LPCWSTR
)
);
/* add the verb, path and HTTP version string */
/* add the verb, path and HTTP version string */
...
@@ -269,7 +269,8 @@ static LPWSTR HTTP_BuildHeaderRequestString( LPWININETHTTPREQW lpwhr, LPCWSTR ve
...
@@ -269,7 +269,8 @@ static LPWSTR HTTP_BuildHeaderRequestString( LPWININETHTTPREQW lpwhr, LPCWSTR ve
req
[
n
++
]
=
verb
;
req
[
n
++
]
=
verb
;
req
[
n
++
]
=
szSpace
;
req
[
n
++
]
=
szSpace
;
req
[
n
++
]
=
path
;
req
[
n
++
]
=
path
;
req
[
n
++
]
=
g_szHttp1_1
;
req
[
n
++
]
=
szSpace
;
req
[
n
++
]
=
version
;
/* Append custom request headers */
/* Append custom request headers */
for
(
i
=
0
;
i
<
lpwhr
->
nCustHeaders
;
i
++
)
for
(
i
=
0
;
i
<
lpwhr
->
nCustHeaders
;
i
++
)
...
@@ -1404,6 +1405,11 @@ HINTERNET WINAPI HTTP_HttpOpenRequestW(LPWININETHTTPSESSIONW lpwhs,
...
@@ -1404,6 +1405,11 @@ HINTERNET WINAPI HTTP_HttpOpenRequestW(LPWININETHTTPSESSIONW lpwhs,
lpwhr
->
lpszVerb
=
WININET_strdupW
(
lpszVerb
&&
*
lpszVerb
?
lpszVerb
:
szGET
);
lpwhr
->
lpszVerb
=
WININET_strdupW
(
lpszVerb
&&
*
lpszVerb
?
lpszVerb
:
szGET
);
if
(
lpszVersion
)
lpwhr
->
lpszVersion
=
WININET_strdupW
(
lpszVersion
);
else
lpwhr
->
lpszVersion
=
WININET_strdupW
(
g_szHttp1_1
);
HTTP_ProcessHeader
(
lpwhr
,
szHost
,
lpwhs
->
lpszHostName
,
HTTP_ADDREQ_FLAG_ADD
|
HTTP_ADDHDR_FLAG_REQ
);
HTTP_ProcessHeader
(
lpwhr
,
szHost
,
lpwhs
->
lpszHostName
,
HTTP_ADDREQ_FLAG_ADD
|
HTTP_ADDHDR_FLAG_REQ
);
if
(
lpwhs
->
nServerPort
==
INTERNET_INVALID_PORT_NUMBER
)
if
(
lpwhs
->
nServerPort
==
INTERNET_INVALID_PORT_NUMBER
)
...
@@ -1633,7 +1639,7 @@ static BOOL WINAPI HTTP_HttpQueryInfoW( LPWININETHTTPREQW lpwhr, DWORD dwInfoLev
...
@@ -1633,7 +1639,7 @@ static BOOL WINAPI HTTP_HttpQueryInfoW( LPWININETHTTPREQW lpwhr, DWORD dwInfoLev
BOOL
ret
;
BOOL
ret
;
if
(
request_only
)
if
(
request_only
)
headers
=
HTTP_BuildHeaderRequestString
(
lpwhr
,
lpwhr
->
lpszVerb
,
lpwhr
->
lpszPath
);
headers
=
HTTP_BuildHeaderRequestString
(
lpwhr
,
lpwhr
->
lpszVerb
,
lpwhr
->
lpszPath
,
lpwhr
->
lpszVersion
);
else
else
headers
=
lpwhr
->
lpszRawHeaders
;
headers
=
lpwhr
->
lpszRawHeaders
;
...
@@ -2518,7 +2524,7 @@ static BOOL HTTP_SecureProxyConnect(LPWININETHTTPREQW lpwhr)
...
@@ -2518,7 +2524,7 @@ static BOOL HTTP_SecureProxyConnect(LPWININETHTTPREQW lpwhr)
lpszPath
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
lstrlenW
(
lpwhs
->
lpszHostName
)
+
13
)
*
sizeof
(
WCHAR
)
);
lpszPath
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
lstrlenW
(
lpwhs
->
lpszHostName
)
+
13
)
*
sizeof
(
WCHAR
)
);
sprintfW
(
lpszPath
,
szFormat
,
lpwhs
->
lpszHostName
,
lpwhs
->
nHostPort
);
sprintfW
(
lpszPath
,
szFormat
,
lpwhs
->
lpszHostName
,
lpwhs
->
nHostPort
);
requestString
=
HTTP_BuildHeaderRequestString
(
lpwhr
,
szConnect
,
lpszPath
);
requestString
=
HTTP_BuildHeaderRequestString
(
lpwhr
,
szConnect
,
lpszPath
,
g_szHttp1_1
);
HeapFree
(
GetProcessHeap
(),
0
,
lpszPath
);
HeapFree
(
GetProcessHeap
(),
0
,
lpszPath
);
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
requestString
,
-
1
,
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
requestString
,
-
1
,
...
@@ -2619,7 +2625,7 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders,
...
@@ -2619,7 +2625,7 @@ BOOL WINAPI HTTP_HttpSendRequestW(LPWININETHTTPREQW lpwhr, LPCWSTR lpszHeaders,
HTTP_ADDREQ_FLAG_ADD
|
HTTP_ADDHDR_FLAG_REPLACE
);
HTTP_ADDREQ_FLAG_ADD
|
HTTP_ADDHDR_FLAG_REPLACE
);
}
}
requestString
=
HTTP_BuildHeaderRequestString
(
lpwhr
,
lpwhr
->
lpszVerb
,
lpwhr
->
lpszPath
);
requestString
=
HTTP_BuildHeaderRequestString
(
lpwhr
,
lpwhr
->
lpszVerb
,
lpwhr
->
lpszPath
,
lpwhr
->
lpszVersion
);
TRACE
(
"Request header -> %s
\n
"
,
debugstr_w
(
requestString
)
);
TRACE
(
"Request header -> %s
\n
"
,
debugstr_w
(
requestString
)
);
...
...
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