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
f08e79ce
Commit
f08e79ce
authored
Apr 01, 2013
by
Piotr Caban
Committed by
Alexandre Julliard
Apr 01, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Support Punycode in SetUrlCacheEntryInfoW.
parent
940176d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
73 deletions
+30
-73
urlcache.c
dlls/wininet/urlcache.c
+30
-73
No files found.
dlls/wininet/urlcache.c
View file @
f08e79ce
...
@@ -1351,31 +1351,31 @@ static DWORD urlcache_copy_entry(
...
@@ -1351,31 +1351,31 @@ static DWORD urlcache_copy_entry(
* urlcache_set_entry_info (Internal)
* urlcache_set_entry_info (Internal)
*
*
* Helper for SetUrlCacheEntryInfo{A,W}. Sets fields in URL entry
* Helper for SetUrlCacheEntryInfo{A,W}. Sets fields in URL entry
* according to the flags set by
dwFieldC
ontrol.
* according to the flags set by
field_c
ontrol.
*
*
* RETURNS
* RETURNS
* ERROR_SUCCESS if the buffer was big enough
* ERROR_SUCCESS if the buffer was big enough
* ERROR_INSUFFICIENT_BUFFER if the buffer was too small
* ERROR_INSUFFICIENT_BUFFER if the buffer was too small
*
*
*/
*/
static
DWORD
urlcache_set_entry_info
(
entry_url
*
pUrlEntry
,
const
INTERNET_CACHE_ENTRY_INFOW
*
lpCacheEntryInfo
,
DWORD
dwFieldC
ontrol
)
static
DWORD
urlcache_set_entry_info
(
entry_url
*
url_entry
,
const
INTERNET_CACHE_ENTRY_INFOA
*
entry_info
,
DWORD
field_c
ontrol
)
{
{
if
(
dwFieldC
ontrol
&
CACHE_ENTRY_ACCTIME_FC
)
if
(
field_c
ontrol
&
CACHE_ENTRY_ACCTIME_FC
)
pUrlEntry
->
access_time
=
lpCacheEntryI
nfo
->
LastAccessTime
;
url_entry
->
access_time
=
entry_i
nfo
->
LastAccessTime
;
if
(
dwFieldC
ontrol
&
CACHE_ENTRY_ATTRIBUTE_FC
)
if
(
field_c
ontrol
&
CACHE_ENTRY_ATTRIBUTE_FC
)
pUrlEntry
->
cache_entry_type
=
lpCacheEntryI
nfo
->
CacheEntryType
;
url_entry
->
cache_entry_type
=
entry_i
nfo
->
CacheEntryType
;
if
(
dwFieldC
ontrol
&
CACHE_ENTRY_EXEMPT_DELTA_FC
)
if
(
field_c
ontrol
&
CACHE_ENTRY_EXEMPT_DELTA_FC
)
pUrlEntry
->
exempt_delta
=
lpCacheEntryI
nfo
->
u
.
dwExemptDelta
;
url_entry
->
exempt_delta
=
entry_i
nfo
->
u
.
dwExemptDelta
;
if
(
dwFieldC
ontrol
&
CACHE_ENTRY_EXPTIME_FC
)
if
(
field_c
ontrol
&
CACHE_ENTRY_EXPTIME_FC
)
file_time_to_dos_date_time
(
&
lpCacheEntryInfo
->
ExpireTime
,
&
pUrlEntry
->
expire_date
,
&
pUrlE
ntry
->
expire_time
);
file_time_to_dos_date_time
(
&
entry_info
->
ExpireTime
,
&
url_entry
->
expire_date
,
&
url_e
ntry
->
expire_time
);
if
(
dwFieldC
ontrol
&
CACHE_ENTRY_HEADERINFO_FC
)
if
(
field_c
ontrol
&
CACHE_ENTRY_HEADERINFO_FC
)
FIXME
(
"CACHE_ENTRY_HEADERINFO_FC unimplemented
\n
"
);
FIXME
(
"CACHE_ENTRY_HEADERINFO_FC unimplemented
\n
"
);
if
(
dwFieldC
ontrol
&
CACHE_ENTRY_HITRATE_FC
)
if
(
field_c
ontrol
&
CACHE_ENTRY_HITRATE_FC
)
pUrlEntry
->
hit_rate
=
lpCacheEntryI
nfo
->
dwHitRate
;
url_entry
->
hit_rate
=
entry_i
nfo
->
dwHitRate
;
if
(
dwFieldC
ontrol
&
CACHE_ENTRY_MODTIME_FC
)
if
(
field_c
ontrol
&
CACHE_ENTRY_MODTIME_FC
)
pUrlEntry
->
modification_time
=
lpCacheEntryI
nfo
->
LastModifiedTime
;
url_entry
->
modification_time
=
entry_i
nfo
->
LastModifiedTime
;
if
(
dwFieldC
ontrol
&
CACHE_ENTRY_SYNCTIME_FC
)
if
(
field_c
ontrol
&
CACHE_ENTRY_SYNCTIME_FC
)
file_time_to_dos_date_time
(
&
lpCacheEntryInfo
->
LastAccessTime
,
&
pUrlEntry
->
sync_date
,
&
pUrlE
ntry
->
sync_time
);
file_time_to_dos_date_time
(
&
entry_info
->
LastAccessTime
,
&
url_entry
->
sync_date
,
&
url_e
ntry
->
sync_time
);
return
ERROR_SUCCESS
;
return
ERROR_SUCCESS
;
}
}
...
@@ -1973,10 +1973,9 @@ BOOL WINAPI GetUrlCacheEntryInfoW(LPCWSTR lpszUrl,
...
@@ -1973,10 +1973,9 @@ BOOL WINAPI GetUrlCacheEntryInfoW(LPCWSTR lpszUrl,
/***********************************************************************
/***********************************************************************
* SetUrlCacheEntryInfoA (WININET.@)
* SetUrlCacheEntryInfoA (WININET.@)
*/
*/
BOOL
WINAPI
SetUrlCacheEntryInfoA
(
BOOL
WINAPI
SetUrlCacheEntryInfoA
(
LPCSTR
lpszUrlName
,
LPCSTR
lpszUrlName
,
LPINTERNET_CACHE_ENTRY_INFOA
lpCacheEntryInfo
,
LPINTERNET_CACHE_ENTRY_INFOA
lpCacheEntryInfo
,
DWORD
dwFieldControl
)
DWORD
dwFieldControl
)
{
{
urlcache_header
*
pHeader
;
urlcache_header
*
pHeader
;
struct
hash_entry
*
pHashEntry
;
struct
hash_entry
*
pHashEntry
;
...
@@ -2020,10 +2019,7 @@ BOOL WINAPI SetUrlCacheEntryInfoA(
...
@@ -2020,10 +2019,7 @@ BOOL WINAPI SetUrlCacheEntryInfoA(
return
FALSE
;
return
FALSE
;
}
}
urlcache_set_entry_info
(
urlcache_set_entry_info
((
entry_url
*
)
pEntry
,
lpCacheEntryInfo
,
dwFieldControl
);
(
entry_url
*
)
pEntry
,
(
const
INTERNET_CACHE_ENTRY_INFOW
*
)
lpCacheEntryInfo
,
dwFieldControl
);
cache_container_unlock_index
(
pContainer
,
pHeader
);
cache_container_unlock_index
(
pContainer
,
pHeader
);
...
@@ -2033,58 +2029,19 @@ BOOL WINAPI SetUrlCacheEntryInfoA(
...
@@ -2033,58 +2029,19 @@ BOOL WINAPI SetUrlCacheEntryInfoA(
/***********************************************************************
/***********************************************************************
* SetUrlCacheEntryInfoW (WININET.@)
* SetUrlCacheEntryInfoW (WININET.@)
*/
*/
BOOL
WINAPI
SetUrlCacheEntryInfoW
(
LPCWSTR
lpszUrl
,
LPINTERNET_CACHE_ENTRY_INFOW
lpCacheEntryInfo
,
DWORD
dwFieldControl
)
BOOL
WINAPI
SetUrlCacheEntryInfoW
(
LPCWSTR
lpszUrl
,
LPINTERNET_CACHE_ENTRY_INFOW
lpCacheEntryInfo
,
DWORD
dwFieldControl
)
{
{
urlcache_header
*
pHeader
;
char
*
url
;
struct
hash_entry
*
pHashEntry
;
BOOL
ret
;
entry_header
*
pEntry
;
cache_container
*
pContainer
;
DWORD
error
;
TRACE
(
"(%s, %p, 0x%08x)
\n
"
,
debugstr_w
(
lpszUrl
),
lpCacheEntryInfo
,
dwFieldControl
);
error
=
cache_containers_findW
(
lpszUrl
,
&
pContainer
);
if
(
error
!=
ERROR_SUCCESS
)
{
SetLastError
(
error
);
return
FALSE
;
}
error
=
cache_container_open_index
(
pContainer
,
MIN_BLOCK_NO
);
if
(
error
!=
ERROR_SUCCESS
)
{
SetLastError
(
error
);
return
FALSE
;
}
if
(
!
(
pHeader
=
cache_container_lock_index
(
pContainer
)))
return
FALSE
;
if
(
!
urlcache_find_hash_entryW
(
pHeader
,
lpszUrl
,
&
pHashEntry
))
{
cache_container_unlock_index
(
pContainer
,
pHeader
);
WARN
(
"entry %s not found!
\n
"
,
debugstr_w
(
lpszUrl
));
SetLastError
(
ERROR_FILE_NOT_FOUND
);
return
FALSE
;
}
pEntry
=
(
entry_header
*
)((
LPBYTE
)
pHeader
+
pHashEntry
->
offset
);
if
(
!
urlcache_encode_url_alloc
(
lpszUrl
,
&
url
))
if
(
pEntry
->
signature
!=
URL_SIGNATURE
)
{
cache_container_unlock_index
(
pContainer
,
pHeader
);
FIXME
(
"Trying to retrieve entry of unknown format %s
\n
"
,
debugstr_an
((
LPSTR
)
&
pEntry
->
signature
,
sizeof
(
DWORD
)));
SetLastError
(
ERROR_FILE_NOT_FOUND
);
return
FALSE
;
return
FALSE
;
}
urlcache_set_entry_info
(
(
entry_url
*
)
pEntry
,
lpCacheEntryInfo
,
dwFieldControl
);
cache_container_unlock_index
(
pContainer
,
pHeader
);
return
TRUE
;
ret
=
SetUrlCacheEntryInfoA
(
url
,
(
INTERNET_CACHE_ENTRY_INFOA
*
)
lpCacheEntryInfo
,
dwFieldControl
);
heap_free
(
url
);
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