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
c2932858
Commit
c2932858
authored
Jun 16, 2009
by
Hans Leidekker
Committed by
Alexandre Julliard
Jun 16, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Implement InternetQueryOption(INTERNET_OPTION_CACHE_TIMESTAMPS).
parent
7ba8c86f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
14 deletions
+55
-14
http.c
dlls/wininet/http.c
+49
-14
wininet.h
include/wininet.h
+6
-0
No files found.
dlls/wininet/http.c
View file @
c2932858
...
@@ -1568,6 +1568,20 @@ static void HTTPREQ_CloseConnection(WININETHANDLEHEADER *hdr)
...
@@ -1568,6 +1568,20 @@ static void HTTPREQ_CloseConnection(WININETHANDLEHEADER *hdr)
INTERNET_STATUS_CONNECTION_CLOSED
,
0
,
0
);
INTERNET_STATUS_CONNECTION_CLOSED
,
0
,
0
);
}
}
static
BOOL
HTTP_GetRequestURL
(
WININETHTTPREQW
*
req
,
LPWSTR
buf
)
{
LPHTTPHEADERW
host_header
;
static
const
WCHAR
formatW
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
':'
,
'/'
,
'/'
,
'%'
,
's'
,
'%'
,
's'
,
0
};
host_header
=
HTTP_GetHeader
(
req
,
hostW
);
if
(
!
host_header
)
return
FALSE
;
sprintfW
(
buf
,
formatW
,
host_header
->
lpszValue
,
req
->
lpszPath
);
/* FIXME */
return
TRUE
;
}
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
;
WININETHTTPREQW
*
req
=
(
WININETHTTPREQW
*
)
hdr
;
...
@@ -1620,6 +1634,41 @@ static DWORD HTTPREQ_QueryOption(WININETHANDLEHEADER *hdr, DWORD option, void *b
...
@@ -1620,6 +1634,41 @@ static DWORD HTTPREQ_QueryOption(WININETHANDLEHEADER *hdr, DWORD option, void *b
}
}
}
}
case
INTERNET_OPTION_CACHE_TIMESTAMPS
:
{
INTERNET_CACHE_ENTRY_INFOW
*
info
;
INTERNET_CACHE_TIMESTAMPS
*
ts
=
buffer
;
WCHAR
url
[
INTERNET_MAX_URL_LENGTH
];
DWORD
nbytes
,
error
;
BOOL
ret
;
TRACE
(
"INTERNET_OPTION_CACHE_TIMESTAMPS
\n
"
);
if
(
*
size
<
sizeof
(
*
ts
))
{
*
size
=
sizeof
(
*
ts
);
return
ERROR_INSUFFICIENT_BUFFER
;
}
nbytes
=
0
;
HTTP_GetRequestURL
(
req
,
url
);
ret
=
GetUrlCacheEntryInfoW
(
url
,
NULL
,
&
nbytes
);
error
=
GetLastError
();
if
(
!
ret
&&
error
==
ERROR_INSUFFICIENT_BUFFER
)
{
if
(
!
(
info
=
HeapAlloc
(
GetProcessHeap
(),
0
,
nbytes
)))
return
ERROR_OUTOFMEMORY
;
GetUrlCacheEntryInfoW
(
url
,
info
,
&
nbytes
);
ts
->
ftExpires
=
info
->
ExpireTime
;
ts
->
ftLastModified
=
info
->
LastModifiedTime
;
HeapFree
(
GetProcessHeap
(),
0
,
info
);
*
size
=
sizeof
(
*
ts
);
return
ERROR_SUCCESS
;
}
return
error
;
}
case
INTERNET_OPTION_DATAFILE_NAME
:
{
case
INTERNET_OPTION_DATAFILE_NAME
:
{
DWORD
req_size
;
DWORD
req_size
;
...
@@ -3244,20 +3293,6 @@ BOOL WINAPI HttpSendRequestA(HINTERNET hHttpRequest, LPCSTR lpszHeaders,
...
@@ -3244,20 +3293,6 @@ BOOL WINAPI HttpSendRequestA(HINTERNET hHttpRequest, LPCSTR lpszHeaders,
return
result
;
return
result
;
}
}
static
BOOL
HTTP_GetRequestURL
(
WININETHTTPREQW
*
req
,
LPWSTR
buf
)
{
LPHTTPHEADERW
host_header
;
static
const
WCHAR
formatW
[]
=
{
'h'
,
't'
,
't'
,
'p'
,
':'
,
'/'
,
'/'
,
'%'
,
's'
,
'%'
,
's'
,
0
};
host_header
=
HTTP_GetHeader
(
req
,
hostW
);
if
(
!
host_header
)
return
FALSE
;
sprintfW
(
buf
,
formatW
,
host_header
->
lpszValue
,
req
->
lpszPath
);
/* FIXME */
return
TRUE
;
}
/***********************************************************************
/***********************************************************************
* HTTP_GetRedirectURL (internal)
* HTTP_GetRedirectURL (internal)
*/
*/
...
...
include/wininet.h
View file @
c2932858
...
@@ -1536,6 +1536,12 @@ typedef struct _INTERNET_CACHE_ENTRY_INFOW {
...
@@ -1536,6 +1536,12 @@ typedef struct _INTERNET_CACHE_ENTRY_INFOW {
DECL_WINELIB_TYPE_AW
(
INTERNET_CACHE_ENTRY_INFO
)
DECL_WINELIB_TYPE_AW
(
INTERNET_CACHE_ENTRY_INFO
)
DECL_WINELIB_TYPE_AW
(
LPINTERNET_CACHE_ENTRY_INFO
)
DECL_WINELIB_TYPE_AW
(
LPINTERNET_CACHE_ENTRY_INFO
)
typedef
struct
_INTERNET_CACHE_TIMESTAMPS
{
FILETIME
ftExpires
;
FILETIME
ftLastModified
;
}
INTERNET_CACHE_TIMESTAMPS
,
*
LPINTERNET_CACHE_TIMESTAMPS
;
BOOLAPI
CreateUrlCacheEntryA
(
LPCSTR
,
DWORD
,
LPCSTR
,
LPSTR
,
DWORD
);
BOOLAPI
CreateUrlCacheEntryA
(
LPCSTR
,
DWORD
,
LPCSTR
,
LPSTR
,
DWORD
);
BOOLAPI
CreateUrlCacheEntryW
(
LPCWSTR
,
DWORD
,
LPCWSTR
,
LPWSTR
,
DWORD
);
BOOLAPI
CreateUrlCacheEntryW
(
LPCWSTR
,
DWORD
,
LPCWSTR
,
LPWSTR
,
DWORD
);
#define CreateUrlCacheEntry WINELIB_NAME_AW(CreateUrlCacheEntry)
#define CreateUrlCacheEntry WINELIB_NAME_AW(CreateUrlCacheEntry)
...
...
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