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
3462299c
Commit
3462299c
authored
Apr 12, 2004
by
Mike McCormack
Committed by
Alexandre Julliard
Apr 12, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert unicode strings to const.
parent
7104df5d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
67 additions
and
68 deletions
+67
-68
cookie.c
dlls/wininet/cookie.c
+4
-4
dialogs.c
dlls/wininet/dialogs.c
+2
-2
http.c
dlls/wininet/http.c
+46
-47
internet.c
dlls/wininet/internet.c
+15
-15
No files found.
dlls/wininet/cookie.c
View file @
3462299c
...
...
@@ -343,11 +343,11 @@ BOOL WINAPI InternetGetCookieW(LPCWSTR lpszUrl, LPCWSTR lpszCookieName,
* It'd be nice to know what exactly is going on, M$ tracking users? Does this need
* to be unique? Should I generate a random number here? etc.
*/
WCHAR
TrackingString
[]
=
{
const
WCHAR
TrackingString
[]
=
{
'M'
,
't'
,
'r'
,
'x'
,
'T'
,
'r'
,
'a'
,
'c'
,
'k'
,
'i'
,
'n'
,
'g'
,
'I'
,
'D'
,
'='
,
'0'
,
'1'
,
'2'
,
'3'
,
'4'
,
'5'
,
'6'
,
'7'
,
'8'
,
'9'
,
'0'
,
'1'
,
'2'
,
'3'
,
'4'
,
'5'
,
'6'
,
'7'
,
'8'
,
'9'
,
'0'
,
'1'
,
'2'
,
'3'
,
'4'
,
'5'
,
'6'
,
'7'
,
'8'
,
'9'
,
'0'
,
'1'
,
0
};
WCHAR
szps
[]
=
{
'%'
,
's'
,
0
};
const
WCHAR
szps
[]
=
{
'%'
,
's'
,
0
};
TRACE
(
"(%s, %s, %p, %p)
\n
"
,
debugstr_w
(
lpszUrl
),
debugstr_w
(
lpszCookieName
),
lpCookieData
,
lpdwSize
);
...
...
@@ -377,8 +377,8 @@ BOOL WINAPI InternetGetCookieW(LPCWSTR lpszUrl, LPCWSTR lpszCookieName,
}
while
(
thisCookie
)
{
WCHAR
szsc
[]
=
{
';'
,
' '
,
0
};
WCHAR
szpseq
[]
=
{
'%'
,
's'
,
'='
,
'%'
,
's'
,
0
};
const
WCHAR
szsc
[]
=
{
';'
,
' '
,
0
};
const
WCHAR
szpseq
[]
=
{
'%'
,
's'
,
'='
,
'%'
,
's'
,
0
};
cnt
+=
snprintfW
(
lpCookieData
+
cnt
,
*
lpdwSize
-
cnt
,
szsc
);
cnt
+=
snprintfW
(
lpCookieData
+
cnt
,
*
lpdwSize
-
cnt
,
szpseq
,
thisCookie
->
lpCookieName
,
...
...
dlls/wininet/dialogs.c
View file @
3462299c
...
...
@@ -93,7 +93,7 @@ static BOOL WININET_GetAuthRealm( HINTERNET hRequest, LPWSTR szBuf, DWORD sz )
{
LPWSTR
p
,
q
;
DWORD
index
;
WCHAR
szRealm
[]
=
{
'r'
,
'e'
,
'a'
,
'l'
,
'm'
,
'='
,
0
};
const
WCHAR
szRealm
[]
=
{
'r'
,
'e'
,
'a'
,
'l'
,
'm'
,
'='
,
0
};
/* extract the Realm from the proxy response and show it */
index
=
0
;
...
...
@@ -136,7 +136,7 @@ static BOOL WININET_GetSetPassword( HWND hdlg, LPCWSTR szServer,
DWORD
r
,
dwMagic
=
19
;
UINT
r_len
,
u_len
;
WORD
sz
;
WCHAR
szColon
[]
=
{
':'
,
0
},
szbs
[]
=
{
'/'
,
0
};
const
WCHAR
szColon
[]
=
{
':'
,
0
},
szbs
[]
=
{
'/'
,
0
};
hUserItem
=
GetDlgItem
(
hdlg
,
IDC_USERNAME
);
hPassItem
=
GetDlgItem
(
hdlg
,
IDC_PASSWORD
);
...
...
dlls/wininet/http.c
View file @
3462299c
...
...
@@ -470,8 +470,8 @@ static LPWSTR HTTP_EncodeBasicAuth( LPCWSTR username, LPCWSTR password)
{
UINT
len
;
LPWSTR
in
,
out
;
WCHAR
szBasic
[]
=
{
'B'
,
'a'
,
's'
,
'i'
,
'c'
,
' '
,
0
};
WCHAR
szColon
[]
=
{
':'
,
0
};
const
WCHAR
szBasic
[]
=
{
'B'
,
'a'
,
's'
,
'i'
,
'c'
,
' '
,
0
};
const
WCHAR
szColon
[]
=
{
':'
,
0
};
len
=
lstrlenW
(
username
)
+
1
+
lstrlenW
(
password
)
+
1
;
in
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
...
...
@@ -504,7 +504,7 @@ BOOL HTTP_InsertProxyAuthorization( LPWININETHTTPREQW lpwhr,
{
HTTPHEADERW
hdr
;
INT
index
;
WCHAR
szProxyAuthorization
[]
=
{
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
);
...
...
@@ -538,10 +538,9 @@ static BOOL HTTP_DealWithProxy( LPWININETAPPINFOW hIC,
WCHAR
proxy
[
MAXHOSTNAME
+
15
];
/* 15 == "http://" + sizeof(port#) + ":/\0" */
WCHAR
*
url
,
szNul
[]
=
{
0
};
URL_COMPONENTSW
UrlComponents
;
WCHAR
szHttp
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
':'
,
'/'
,
'/'
,
0
},
szSlash
[]
=
{
'/'
,
0
}
;
/*WCHAR szColon[] = { ':',0 }; */
WCHAR
szFormat1
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
':'
,
'/'
,
'/'
,
'%'
,
's'
,
':'
,
'%'
,
'd'
,
0
};
WCHAR
szFormat2
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
':'
,
'/'
,
'/'
,
'%'
,
's'
,
':'
,
'%'
,
'd'
,
0
};
const
WCHAR
szHttp
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
':'
,
'/'
,
'/'
,
0
},
szSlash
[]
=
{
'/'
,
0
}
;
const
WCHAR
szFormat1
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
':'
,
'/'
,
'/'
,
'%'
,
's'
,
':'
,
'%'
,
'd'
,
0
};
const
WCHAR
szFormat2
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
':'
,
'/'
,
'/'
,
'%'
,
's'
,
':'
,
'%'
,
'd'
,
0
};
int
len
;
memset
(
&
UrlComponents
,
0
,
sizeof
UrlComponents
);
...
...
@@ -607,7 +606,7 @@ HINTERNET WINAPI HTTP_HttpOpenRequestW(HINTERNET hHttpSession,
LPWSTR
lpszUrl
=
NULL
;
DWORD
nCookieSize
;
HINTERNET
handle
;
WCHAR
szUrlForm
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
':'
,
'/'
,
'/'
,
'%'
,
's'
,
0
};
const
WCHAR
szUrlForm
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
':'
,
'/'
,
'/'
,
'%'
,
's'
,
0
};
DWORD
len
;
TRACE
(
"-->
\n
"
);
...
...
@@ -670,7 +669,7 @@ HINTERNET WINAPI HTTP_HttpOpenRequestW(HINTERNET hHttpSession,
if
(
NULL
==
lpszVerb
)
{
WCHAR
szGet
[]
=
{
'G'
,
'E'
,
'T'
,
0
};
const
WCHAR
szGet
[]
=
{
'G'
,
'E'
,
'T'
,
0
};
lpwhr
->
lpszVerb
=
WININET_strdupW
(
szGet
);
}
else
if
(
strlenW
(
lpszVerb
))
...
...
@@ -698,7 +697,7 @@ HINTERNET WINAPI HTTP_HttpOpenRequestW(HINTERNET hHttpSession,
if
(
hIC
->
lpszAgent
)
{
WCHAR
*
agent_header
;
WCHAR
user_agent
[]
=
{
'U'
,
's'
,
'e'
,
'r'
,
'-'
,
'A'
,
'g'
,
'e'
,
'n'
,
't'
,
':'
,
' '
,
'%'
,
's'
,
'\r'
,
'\n'
,
0
};
const
WCHAR
user_agent
[]
=
{
'U'
,
's'
,
'e'
,
'r'
,
'-'
,
'A'
,
'g'
,
'e'
,
'n'
,
't'
,
':'
,
' '
,
'%'
,
's'
,
'\r'
,
'\n'
,
0
};
len
=
strlenW
(
hIC
->
lpszAgent
)
+
strlenW
(
user_agent
);
agent_header
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
*
sizeof
(
WCHAR
)
);
...
...
@@ -716,8 +715,8 @@ HINTERNET WINAPI HTTP_HttpOpenRequestW(HINTERNET hHttpSession,
if
(
InternetGetCookieW
(
lpszUrl
,
NULL
,
NULL
,
&
nCookieSize
))
{
int
cnt
=
0
;
WCHAR
szCookie
[]
=
{
'C'
,
'o'
,
'o'
,
'k'
,
'i'
,
'e'
,
':'
,
' '
,
0
};
WCHAR
szcrlf
[]
=
{
'\r'
,
'\n'
,
0
};
const
WCHAR
szCookie
[]
=
{
'C'
,
'o'
,
'o'
,
'k'
,
'i'
,
'e'
,
':'
,
' '
,
0
};
const
WCHAR
szcrlf
[]
=
{
'\r'
,
'\n'
,
0
};
lpszCookies
=
HeapAlloc
(
GetProcessHeap
(),
0
,
(
nCookieSize
+
1
+
8
)
*
sizeof
(
WCHAR
));
...
...
@@ -789,9 +788,9 @@ BOOL WINAPI HttpQueryInfoW(HINTERNET hHttpRequest, DWORD dwInfoLevel,
LPHTTPHEADERW
lphttpHdr
=
NULL
;
BOOL
bSuccess
=
FALSE
;
LPWININETHTTPREQW
lpwhr
;
WCHAR
szFmt
[]
=
{
'%'
,
's'
,
':'
,
' '
,
'%'
,
's'
,
'%'
,
's'
,
0
};
WCHAR
szcrlf
[]
=
{
'\r'
,
'\n'
,
0
};
WCHAR
sznul
[]
=
{
0
};
const
WCHAR
szFmt
[]
=
{
'%'
,
's'
,
':'
,
' '
,
'%'
,
's'
,
'%'
,
's'
,
0
};
const
WCHAR
szcrlf
[]
=
{
'\r'
,
'\n'
,
0
};
const
WCHAR
sznul
[]
=
{
0
};
if
(
TRACE_ON
(
wininet
))
{
#define FE(x) { x, #x }
...
...
@@ -1419,12 +1418,12 @@ BOOL WINAPI HTTP_HttpSendRequestW(HINTERNET hHttpRequest, LPCWSTR lpszHeaders,
do
{
WCHAR
szSlash
[]
=
{
'/'
,
0
};
WCHAR
szSpace
[]
=
{
' '
,
0
};
WCHAR
szHttp
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
':'
,
'/'
,
'/'
,
0
};
WCHAR
szcrlf
[]
=
{
'\r'
,
'\n'
,
0
};
WCHAR
sztwocrlf
[]
=
{
'\r'
,
'\n'
,
'\r'
,
'\n'
,
0
};
WCHAR
szSetCookie
[]
=
{
'S'
,
'e'
,
't'
,
'-'
,
'C'
,
'o'
,
'o'
,
'k'
,
'i'
,
'e'
,
0
};
const
WCHAR
szSlash
[]
=
{
'/'
,
0
};
const
WCHAR
szSpace
[]
=
{
' '
,
0
};
const
WCHAR
szHttp
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
':'
,
'/'
,
'/'
,
0
};
const
WCHAR
szcrlf
[]
=
{
'\r'
,
'\n'
,
0
};
const
WCHAR
sztwocrlf
[]
=
{
'\r'
,
'\n'
,
'\r'
,
'\n'
,
0
};
const
WCHAR
szSetCookie
[]
=
{
'S'
,
'e'
,
't'
,
'-'
,
'C'
,
'o'
,
'o'
,
'k'
,
'i'
,
'e'
,
0
};
TRACE
(
"Going to url %s %s
\n
"
,
debugstr_w
(
lpwhr
->
lpszHostName
),
debugstr_w
(
lpwhr
->
lpszPath
));
loop_next
=
FALSE
;
...
...
@@ -1540,7 +1539,7 @@ BOOL WINAPI HTTP_HttpSendRequestW(HINTERNET hHttpRequest, LPCWSTR lpszHeaders,
{
if
(
lpwhr
->
StdHeaders
[
i
].
wFlags
&
HDR_ISREQUEST
)
{
WCHAR
szFmt
[]
=
{
'\r'
,
'\n'
,
'%'
,
's'
,
':'
,
' '
,
'%'
,
's'
,
0
};
const
WCHAR
szFmt
[]
=
{
'\r'
,
'\n'
,
'%'
,
's'
,
':'
,
' '
,
'%'
,
's'
,
0
};
cnt
+=
sprintfW
(
requestString
+
cnt
,
szFmt
,
lpwhr
->
StdHeaders
[
i
].
lpszField
,
lpwhr
->
StdHeaders
[
i
].
lpszValue
);
TRACE
(
"Adding header %s (%s)
\n
"
,
...
...
@@ -1554,7 +1553,7 @@ BOOL WINAPI HTTP_HttpSendRequestW(HINTERNET hHttpRequest, LPCWSTR lpszHeaders,
{
if
(
lpwhr
->
pCustHeaders
[
i
].
wFlags
&
HDR_ISREQUEST
)
{
WCHAR
szFmt
[]
=
{
'\r'
,
'\n'
,
'%'
,
's'
,
':'
,
' '
,
'%'
,
's'
,
0
};
const
WCHAR
szFmt
[]
=
{
'\r'
,
'\n'
,
'%'
,
's'
,
':'
,
' '
,
'%'
,
's'
,
0
};
cnt
+=
sprintfW
(
requestString
+
cnt
,
szFmt
,
lpwhr
->
pCustHeaders
[
i
].
lpszField
,
lpwhr
->
pCustHeaders
[
i
].
lpszValue
);
TRACE
(
"Adding custom header %s (%s)
\n
"
,
...
...
@@ -1565,7 +1564,7 @@ BOOL WINAPI HTTP_HttpSendRequestW(HINTERNET hHttpRequest, LPCWSTR lpszHeaders,
if
(
lpwhr
->
lpszHostName
)
{
WCHAR
szFmt
[]
=
{
'%'
,
's'
,
'%'
,
's'
,
0
};
const
WCHAR
szFmt
[]
=
{
'%'
,
's'
,
'%'
,
's'
,
0
};
cnt
+=
sprintfW
(
requestString
+
cnt
,
szFmt
,
HTTPHOSTHEADER
,
lpwhr
->
lpszHostName
);
}
...
...
@@ -1658,7 +1657,7 @@ BOOL WINAPI HTTP_HttpSendRequestW(HINTERNET hHttpRequest, LPCWSTR lpszHeaders,
{
LPHTTPHEADERW
setCookieHeader
;
int
nPosStart
=
0
,
nPosEnd
=
0
,
len
;
WCHAR
szFmt
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
':'
,
'/'
,
'/'
,
'%'
,
's'
,
'/'
,
0
};
const
WCHAR
szFmt
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
':'
,
'/'
,
'/'
,
'%'
,
's'
,
'/'
,
0
};
setCookieHeader
=
&
lpwhr
->
pCustHeaders
[
CustHeaderIndex
];
...
...
@@ -1678,7 +1677,7 @@ BOOL WINAPI HTTP_HttpSendRequestW(HINTERNET hHttpRequest, LPCWSTR lpszHeaders,
/* fixme: not case sensitive, strcasestr is gnu only */
int
nDomainPosEnd
=
0
;
int
nDomainPosStart
=
0
,
nDomainLength
=
0
;
WCHAR
szDomain
[]
=
{
'd'
,
'o'
,
'm'
,
'a'
,
'i'
,
'n'
,
'='
,
0
};
const
WCHAR
szDomain
[]
=
{
'd'
,
'o'
,
'm'
,
'a'
,
'i'
,
'n'
,
'='
,
0
};
LPWSTR
lpszDomain
=
strstrW
(
&
setCookieHeader
->
lpszValue
[
nPosEnd
],
szDomain
);
if
(
lpszDomain
)
{
/* they have specified their own domain, lets use it */
...
...
@@ -1952,8 +1951,8 @@ BOOL HTTP_GetResponseHeaders(LPWININETHTTPREQW lpwhr)
BOOL
bSuccess
=
FALSE
;
INT
rc
=
0
;
WCHAR
value
[
MAX_FIELD_VALUE_LEN
],
field
[
MAX_FIELD_LEN
];
WCHAR
szStatus
[]
=
{
'S'
,
't'
,
'a'
,
't'
,
'u'
,
's'
,
0
};
WCHAR
szHttp
[]
=
{
'H'
,
'T'
,
'T'
,
'P'
,
0
};
const
WCHAR
szStatus
[]
=
{
'S'
,
't'
,
'a'
,
't'
,
'u'
,
's'
,
0
};
const
WCHAR
szHttp
[]
=
{
'H'
,
'T'
,
'T'
,
'P'
,
0
};
char
bufferA
[
MAX_REPLY_LEN
];
TRACE
(
"-->
\n
"
);
...
...
@@ -2087,32 +2086,32 @@ BOOL HTTP_InterpretHttpHeader(LPWSTR buffer, LPWSTR field, INT fieldlen, LPWSTR
INT
HTTP_GetStdHeaderIndex
(
LPCWSTR
lpszField
)
{
INT
index
=
-
1
;
WCHAR
szContentLength
[]
=
{
const
WCHAR
szContentLength
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'e'
,
'n'
,
't'
,
'-'
,
'L'
,
'e'
,
'n'
,
'g'
,
't'
,
'h'
,
0
};
WCHAR
szStatus
[]
=
{
'S'
,
't'
,
'a'
,
't'
,
'u'
,
's'
,
0
};
WCHAR
szContentType
[]
=
{
const
WCHAR
szStatus
[]
=
{
'S'
,
't'
,
'a'
,
't'
,
'u'
,
's'
,
0
};
const
WCHAR
szContentType
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'e'
,
'n'
,
't'
,
'-'
,
'T'
,
'y'
,
'p'
,
'e'
,
0
};
WCHAR
szLastModified
[]
=
{
const
WCHAR
szLastModified
[]
=
{
'L'
,
'a'
,
's'
,
't'
,
'-'
,
'M'
,
'o'
,
'd'
,
'i'
,
'f'
,
'i'
,
'e'
,
'd'
,
0
};
WCHAR
szLocation
[]
=
{
'L'
,
'o'
,
'c'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
WCHAR
szAccept
[]
=
{
'A'
,
'c'
,
'c'
,
'e'
,
'p'
,
't'
,
0
};
WCHAR
szReferer
[]
=
{
'R'
,
'e'
,
'f'
,
'e'
,
'r'
,
'e'
,
'r'
,
0
};
WCHAR
szContentTrans
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'e'
,
'n'
,
't'
,
'-'
,
const
WCHAR
szLocation
[]
=
{
'L'
,
'o'
,
'c'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
const
WCHAR
szAccept
[]
=
{
'A'
,
'c'
,
'c'
,
'e'
,
'p'
,
't'
,
0
};
const
WCHAR
szReferer
[]
=
{
'R'
,
'e'
,
'f'
,
'e'
,
'r'
,
'e'
,
'r'
,
0
};
const
WCHAR
szContentTrans
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'e'
,
'n'
,
't'
,
'-'
,
'T'
,
'r'
,
'a'
,
'n'
,
's'
,
'f'
,
'e'
,
'r'
,
'-'
,
'E'
,
'n'
,
'c'
,
'o'
,
'd'
,
'i'
,
'n'
,
'g'
,
0
};
WCHAR
szDate
[]
=
{
'D'
,
'a'
,
't'
,
'e'
,
0
};
WCHAR
szServer
[]
=
{
'S'
,
'e'
,
'r'
,
'v'
,
'e'
,
'r'
,
0
};
WCHAR
szConnection
[]
=
{
'C'
,
'o'
,
'n'
,
'n'
,
'e'
,
'c'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
WCHAR
szETag
[]
=
{
'E'
,
'T'
,
'a'
,
'g'
,
0
};
WCHAR
szAcceptRanges
[]
=
{
const
WCHAR
szDate
[]
=
{
'D'
,
'a'
,
't'
,
'e'
,
0
};
const
WCHAR
szServer
[]
=
{
'S'
,
'e'
,
'r'
,
'v'
,
'e'
,
'r'
,
0
};
const
WCHAR
szConnection
[]
=
{
'C'
,
'o'
,
'n'
,
'n'
,
'e'
,
'c'
,
't'
,
'i'
,
'o'
,
'n'
,
0
};
const
WCHAR
szETag
[]
=
{
'E'
,
'T'
,
'a'
,
'g'
,
0
};
const
WCHAR
szAcceptRanges
[]
=
{
'A'
,
'c'
,
'c'
,
'e'
,
'p'
,
't'
,
'-'
,
'R'
,
'a'
,
'n'
,
'g'
,
'e'
,
's'
,
0
};
WCHAR
szExpires
[]
=
{
'E'
,
'x'
,
'p'
,
'i'
,
'r'
,
'e'
,
's'
,
0
};
WCHAR
szMimeVersion
[]
=
{
const
WCHAR
szExpires
[]
=
{
'E'
,
'x'
,
'p'
,
'i'
,
'r'
,
'e'
,
's'
,
0
};
const
WCHAR
szMimeVersion
[]
=
{
'M'
,
'i'
,
'm'
,
'e'
,
'-'
,
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
0
};
WCHAR
szPragma
[]
=
{
'P'
,
'r'
,
'a'
,
'g'
,
'm'
,
'a'
,
0
};
WCHAR
szCacheControl
[]
=
{
const
WCHAR
szPragma
[]
=
{
'P'
,
'r'
,
'a'
,
'g'
,
'm'
,
'a'
,
0
};
const
WCHAR
szCacheControl
[]
=
{
'C'
,
'a'
,
'c'
,
'h'
,
'e'
,
'-'
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
0
};
WCHAR
szUserAgent
[]
=
{
'U'
,
's'
,
'e'
,
'r'
,
'-'
,
'A'
,
'g'
,
'e'
,
'n'
,
't'
,
0
};
WCHAR
szProxyAuth
[]
=
{
const
WCHAR
szUserAgent
[]
=
{
'U'
,
's'
,
'e'
,
'r'
,
'-'
,
'A'
,
'g'
,
'e'
,
'n'
,
't'
,
0
};
const
WCHAR
szProxyAuth
[]
=
{
'P'
,
'r'
,
'o'
,
'x'
,
'y'
,
'-'
,
'A'
,
'u'
,
't'
,
'h'
,
'e'
,
'n'
,
't'
,
'i'
,
'c'
,
'a'
,
't'
,
'e'
,
0
};
...
...
dlls/wininet/internet.c
View file @
3462299c
...
...
@@ -342,7 +342,7 @@ static BOOL INTERNET_ConfigureProxyFromReg( LPWININETAPPINFOW lpwai )
DWORD
r
,
keytype
,
len
,
enabled
;
LPSTR
lpszInternetSettings
=
"Software
\\
Microsoft
\\
Windows
\\
CurrentVersion
\\
Internet Settings"
;
WCHAR
szProxyServer
[]
=
{
'P'
,
'r'
,
'o'
,
'x'
,
'y'
,
'S'
,
'e'
,
'r'
,
'v'
,
'e'
,
'r'
,
0
};
const
WCHAR
szProxyServer
[]
=
{
'P'
,
'r'
,
'o'
,
'x'
,
'y'
,
'S'
,
'e'
,
'r'
,
'v'
,
'e'
,
'r'
,
0
};
r
=
RegOpenKeyA
(
HKEY_CURRENT_USER
,
lpszInternetSettings
,
&
key
);
if
(
r
!=
ERROR_SUCCESS
)
...
...
@@ -361,7 +361,7 @@ static BOOL INTERNET_ConfigureProxyFromReg( LPWININETAPPINFOW lpwai )
if
(
(
r
==
ERROR_SUCCESS
)
&&
len
&&
(
keytype
==
REG_SZ
)
)
{
LPWSTR
szProxy
,
p
;
WCHAR
szHttp
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
'='
,
0
};
const
WCHAR
szHttp
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
'='
,
0
};
szProxy
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
);
RegQueryValueExW
(
key
,
szProxyServer
,
NULL
,
&
keytype
,
...
...
@@ -1070,14 +1070,14 @@ BOOL WINAPI InternetCrackUrlA(LPCSTR lpszUrl, DWORD dwUrlLength, DWORD dwFlags,
INTERNET_SCHEME
GetInternetSchemeW
(
LPCWSTR
lpszScheme
,
INT
nMaxCmp
)
{
INTERNET_SCHEME
iScheme
=
INTERNET_SCHEME_UNKNOWN
;
WCHAR
lpszFtp
[]
=
{
'f'
,
't'
,
'p'
,
0
};
WCHAR
lpszGopher
[]
=
{
'g'
,
'o'
,
'p'
,
'h'
,
'e'
,
'r'
,
0
};
WCHAR
lpszHttp
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
0
};
WCHAR
lpszHttps
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
's'
,
0
};
WCHAR
lpszFile
[]
=
{
'f'
,
'i'
,
'l'
,
'e'
,
0
};
WCHAR
lpszNews
[]
=
{
'n'
,
'e'
,
'w'
,
's'
,
0
};
WCHAR
lpszMailto
[]
=
{
'm'
,
'a'
,
'i'
,
'l'
,
't'
,
'o'
,
0
};
WCHAR
lpszRes
[]
=
{
'r'
,
'e'
,
's'
,
0
};
const
WCHAR
lpszFtp
[]
=
{
'f'
,
't'
,
'p'
,
0
};
const
WCHAR
lpszGopher
[]
=
{
'g'
,
'o'
,
'p'
,
'h'
,
'e'
,
'r'
,
0
};
const
WCHAR
lpszHttp
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
0
};
const
WCHAR
lpszHttps
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
's'
,
0
};
const
WCHAR
lpszFile
[]
=
{
'f'
,
'i'
,
'l'
,
'e'
,
0
};
const
WCHAR
lpszNews
[]
=
{
'n'
,
'e'
,
'w'
,
's'
,
0
};
const
WCHAR
lpszMailto
[]
=
{
'm'
,
'a'
,
'i'
,
'l'
,
't'
,
'o'
,
0
};
const
WCHAR
lpszRes
[]
=
{
'r'
,
'e'
,
's'
,
0
};
WCHAR
*
tempBuffer
=
NULL
;
TRACE
(
"
\n
"
);
if
(
lpszScheme
==
NULL
)
...
...
@@ -1155,8 +1155,8 @@ BOOL WINAPI InternetCrackUrlW(LPCWSTR lpszUrl, DWORD dwUrlLength, DWORD dwFlags,
BOOL
bIsAbsolute
=
FALSE
;
LPWSTR
lpszap
=
(
WCHAR
*
)
lpszUrl
;
LPWSTR
lpszcp
=
NULL
;
WCHAR
lpszSeparators
[
3
]
=
{
';'
,
'?'
,
0
};
WCHAR
lpszSlash
[
2
]
=
{
'/'
,
0
};
const
WCHAR
lpszSeparators
[
3
]
=
{
';'
,
'?'
,
0
};
const
WCHAR
lpszSlash
[
2
]
=
{
'/'
,
0
};
if
(
dwUrlLength
==
0
)
dwUrlLength
=
strlenW
(
lpszUrl
);
...
...
@@ -1197,7 +1197,7 @@ BOOL WINAPI InternetCrackUrlW(LPCWSTR lpszUrl, DWORD dwUrlLength, DWORD dwFlags,
if
(
bIsAbsolute
)
/* Parse <protocol>:[//<net_loc>] */
{
LPWSTR
lpszNetLoc
;
WCHAR
wszAbout
[]
=
{
'a'
,
'b'
,
'o'
,
'u'
,
't'
,
':'
,
0
};
const
WCHAR
wszAbout
[]
=
{
'a'
,
'b'
,
'o'
,
'u'
,
't'
,
':'
,
0
};
/* Get scheme first. */
lpUC
->
nScheme
=
GetInternetSchemeW
(
lpszUrl
,
lpszcp
-
lpszUrl
);
...
...
@@ -1680,7 +1680,7 @@ static BOOL INET_QueryOptionHelper(BOOL bIsUnicode, HINTERNET hInternet, DWORD d
{
LPWININETHTTPREQW
lpreq
=
(
LPWININETHTTPREQW
)
lpwhh
;
WCHAR
url
[
1023
];
WCHAR
szFmt
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
':'
,
'/'
,
'/'
,
'%'
,
's'
,
'%'
,
's'
,
0
};
const
WCHAR
szFmt
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
':'
,
'/'
,
'/'
,
'%'
,
's'
,
'%'
,
's'
,
0
};
sprintfW
(
url
,
szFmt
,
lpreq
->
lpszHostName
,
lpreq
->
lpszPath
);
TRACE
(
"INTERNET_OPTION_URL: %s
\n
"
,
debugstr_w
(
url
));
...
...
@@ -2076,7 +2076,7 @@ HINTERNET WINAPI INTERNET_InternetOpenUrlW(HINTERNET hInternet, LPCWSTR lpszUrl,
case
INTERNET_SCHEME_HTTP
:
case
INTERNET_SCHEME_HTTPS
:
{
WCHAR
szStars
[]
=
{
'*'
,
'/'
,
'*'
,
0
};
const
WCHAR
szStars
[]
=
{
'*'
,
'/'
,
'*'
,
0
};
LPCWSTR
accept
[
2
]
=
{
szStars
,
NULL
};
if
(
urlComponents
.
nPort
==
0
)
{
if
(
urlComponents
.
nScheme
==
INTERNET_SCHEME_HTTP
)
...
...
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