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
0e010d83
Commit
0e010d83
authored
Mar 12, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 12, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Move InternetQueryOption(INTERNET_OPTION_URL) to vtbl.
parent
e2933c20
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
48 deletions
+34
-48
http.c
dlls/wininet/http.c
+34
-0
internet.c
dlls/wininet/internet.c
+0
-48
No files found.
dlls/wininet/http.c
View file @
0e010d83
...
@@ -1405,6 +1405,8 @@ static void HTTPREQ_CloseConnection(WININETHANDLEHEADER *hdr)
...
@@ -1405,6 +1405,8 @@ static void HTTPREQ_CloseConnection(WININETHANDLEHEADER *hdr)
static
DWORD
HTTPREQ_QueryOption
(
WININETHANDLEHEADER
*
hdr
,
DWORD
option
,
void
*
buffer
,
DWORD
*
size
,
BOOL
unicode
)
static
DWORD
HTTPREQ_QueryOption
(
WININETHANDLEHEADER
*
hdr
,
DWORD
option
,
void
*
buffer
,
DWORD
*
size
,
BOOL
unicode
)
{
{
WININETHTTPREQW
*
req
=
(
WININETHTTPREQW
*
)
hdr
;
switch
(
option
)
{
switch
(
option
)
{
case
INTERNET_OPTION_HANDLE_TYPE
:
case
INTERNET_OPTION_HANDLE_TYPE
:
TRACE
(
"INTERNET_OPTION_HANDLE_TYPE
\n
"
);
TRACE
(
"INTERNET_OPTION_HANDLE_TYPE
\n
"
);
...
@@ -1415,6 +1417,38 @@ static DWORD HTTPREQ_QueryOption(WININETHANDLEHEADER *hdr, DWORD option, void *b
...
@@ -1415,6 +1417,38 @@ static DWORD HTTPREQ_QueryOption(WININETHANDLEHEADER *hdr, DWORD option, void *b
*
size
=
sizeof
(
DWORD
);
*
size
=
sizeof
(
DWORD
);
*
(
DWORD
*
)
buffer
=
INTERNET_HANDLE_TYPE_HTTP_REQUEST
;
*
(
DWORD
*
)
buffer
=
INTERNET_HANDLE_TYPE_HTTP_REQUEST
;
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
case
INTERNET_OPTION_URL
:
{
WCHAR
url
[
INTERNET_MAX_URL_LENGTH
];
HTTPHEADERW
*
host
;
DWORD
len
;
static
const
WCHAR
formatW
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
':'
,
'/'
,
'/'
,
'%'
,
's'
,
'%'
,
's'
,
0
};
static
const
WCHAR
hostW
[]
=
{
'H'
,
'o'
,
's'
,
't'
,
0
};
TRACE
(
"INTERNET_OPTION_URL
\n
"
);
host
=
HTTP_GetHeader
(
req
,
hostW
);
sprintfW
(
url
,
formatW
,
host
->
lpszValue
,
req
->
lpszPath
);
TRACE
(
"INTERNET_OPTION_URL: %s
\n
"
,
debugstr_w
(
url
));
if
(
unicode
)
{
len
=
(
strlenW
(
url
)
+
1
)
*
sizeof
(
WCHAR
);
if
(
*
size
<
len
)
return
ERROR_INSUFFICIENT_BUFFER
;
*
size
=
len
;
strcpyW
(
buffer
,
url
);
return
ERROR_SUCCESS
;
}
else
{
len
=
WideCharToMultiByte
(
CP_ACP
,
0
,
url
,
-
1
,
buffer
,
*
size
,
NULL
,
NULL
);
if
(
len
>
*
size
)
return
ERROR_INSUFFICIENT_BUFFER
;
*
size
=
len
;
return
ERROR_SUCCESS
;
}
}
}
}
FIXME
(
"Not implemented option %d
\n
"
,
option
);
FIXME
(
"Not implemented option %d
\n
"
,
option
);
...
...
dlls/wininet/internet.c
View file @
0e010d83
...
@@ -1868,54 +1868,6 @@ static BOOL INET_QueryOptionHelper(BOOL bIsUnicode, HINTERNET hInternet, DWORD d
...
@@ -1868,54 +1868,6 @@ static BOOL INET_QueryOptionHelper(BOOL bIsUnicode, HINTERNET hInternet, DWORD d
break
;
break
;
}
}
case
INTERNET_OPTION_URL
:
{
TRACE
(
"INTERNET_OPTION_URL
\n
"
);
if
(
!
lpwhh
)
{
WARN
(
"Invalid hInternet handle
\n
"
);
INTERNET_SetLastError
(
ERROR_INVALID_HANDLE
);
return
FALSE
;
}
if
(
lpwhh
->
htype
==
WH_HHTTPREQ
)
{
LPWININETHTTPREQW
lpreq
=
(
LPWININETHTTPREQW
)
lpwhh
;
WCHAR
url
[
1023
];
static
const
WCHAR
szFmt
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
':'
,
'/'
,
'/'
,
'%'
,
's'
,
'%'
,
's'
,
0
};
static
const
WCHAR
szHost
[]
=
{
'H'
,
'o'
,
's'
,
't'
,
0
};
DWORD
sizeRequired
;
LPHTTPHEADERW
Host
;
Host
=
HTTP_GetHeader
(
lpreq
,
szHost
);
sprintfW
(
url
,
szFmt
,
Host
->
lpszValue
,
lpreq
->
lpszPath
);
TRACE
(
"INTERNET_OPTION_URL: %s
\n
"
,
debugstr_w
(
url
));
if
(
!
bIsUnicode
)
{
sizeRequired
=
WideCharToMultiByte
(
CP_ACP
,
0
,
url
,
-
1
,
lpBuffer
,
*
lpdwBufferLength
,
NULL
,
NULL
);
if
(
sizeRequired
>
*
lpdwBufferLength
)
INTERNET_SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
else
bSuccess
=
TRUE
;
*
lpdwBufferLength
=
sizeRequired
;
}
else
{
sizeRequired
=
(
lstrlenW
(
url
)
+
1
)
*
sizeof
(
WCHAR
);
if
(
*
lpdwBufferLength
<
sizeRequired
)
INTERNET_SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
else
{
strcpyW
(
lpBuffer
,
url
);
bSuccess
=
TRUE
;
}
*
lpdwBufferLength
=
sizeRequired
;
}
}
break
;
}
case
INTERNET_OPTION_USER_AGENT
:
case
INTERNET_OPTION_USER_AGENT
:
FIXME
(
"INTERNET_OPTION_USER_AGENT
\n
"
);
FIXME
(
"INTERNET_OPTION_USER_AGENT
\n
"
);
break
;
break
;
...
...
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