Commit Graph

114 Commits

Author SHA1 Message Date
Juan Lang
d2a3832fc3 wininet: Fix off-by-one error. 2011-03-04 16:25:59 +01:00
Juan Lang
75cc509dae wininet: Support setting the expired time in SetUrlCacheEntryInfo. 2011-03-03 17:47:14 +01:00
Henri Verbeet
6e46e9048f wininet: Cut of the query string before searching for the filename in CreateUrlCacheEntryW().
Apparently it's possible to receive URLs with e.g. slashes in the query
string. I was under the impression those were reserved in the query string,
but e.g. Firefox will happily accept them as well.
2010-09-23 12:06:49 +02:00
Henri Verbeet
7782e81887 wininet: Check URLCache_LocalFileNameToPathW() return values in CreateUrlCacheEntryW().
It would be unfortunate if a long file name would cause us to open a file
based on mostly uninitialized data and write the contents of some random
webpage into it.
2010-09-23 12:06:38 +02:00
Piotr Caban
54bdf622a0 wininet: Fixed CreateUrlCacheEntryA implementation. 2010-07-26 09:58:21 +02:00
Gerald Pfeifer
dec98a5997 wininet: Remove variable len which is not really used from CommitUrlCacheEntryInternal. 2010-04-21 15:35:00 +02:00
Mikhail Maroukhine
25306d8be3 wininet: Fix compiler warnings with flag -Wcast-qual. 2010-03-29 12:18:06 +02:00
Mikhail Maroukhine
6e5dfd1fb8 wininet: Fix compiler warnings with flag -Wcast-qual. 2010-03-29 12:11:17 +02:00
Austin English
2387532c3f wininet: Add stubs for FreeUrlCacheSpace. 2009-11-03 21:17:18 +01:00
Hans Leidekker
09f1ace555 wininet: Add some URL cache tests and make them pass. 2009-09-25 14:39:35 +02:00
Hans Leidekker
784b58a280 wininet: Try harder to find a unique cache file name. 2009-09-25 14:39:22 +02:00
Jacek Caban
1c46be7a76 wininet: Code clean up by using heap_strdup* functions. 2009-07-20 12:20:36 +02:00
Hans Leidekker
7ba8c86f85 wininet: Don't fail if dwReserved is set in CreateUrlCacheEntryW. 2009-06-16 15:41:04 +02:00
Hans Leidekker
67b6c2a4e9 wininet: Add a stub implementation of IncrementUrlCacheHeaderData. 2009-05-13 14:48:24 +02:00
Hans Leidekker
7ddec087f0 wininet: Implement GetDiskInfoA. 2009-05-13 14:47:56 +02:00
Alexandre Julliard
7e11ecdd8d wininet: Fix a memory leak in the URL cache. 2009-04-27 20:04:45 +02:00
Marcus Meissner
cb80692cf8 wininet: Fixed memory corruption in urlcache. 2009-04-06 11:16:11 +02:00
Vincent Povirk
9da1d844b8 wininet: Stub RegisterUrlCacheNotification. 2009-03-06 12:38:34 +01:00
Hans Leidekker
cd38e554b6 wininet: Add a stub implementation of GetDiskInfoA. 2009-01-29 15:58:58 +01:00
Hans Leidekker
34d4466342 wininet: Strip trailing slashes from filename in CreateUrlCacheEntryW. 2009-01-21 10:22:46 +01:00
Hans Leidekker
b33792235e wininet: Avoid illegal filenames in CreateUrlCacheEntryW. 2009-01-19 14:20:49 +01:00
Alexandre Julliard
82280618db wininet: Include ws2tcpip.h before anything else for the Windows build. 2008-12-09 11:33:25 +01:00
Michael Stefaniuc
e6bd2881d8 wininet: Remove some superfluous casts. 2008-12-01 12:57:03 +01:00
Francois Gouget
523679666d wininet: Remove WINAPI on static functions where not needed. 2008-11-25 11:50:08 +01:00
Juan Lang
f50b2c237d wininet: Fix trace typo. 2008-10-08 12:17:52 +02:00
Juan Lang
9189bf3d72 wininet: Don't call URL_LocalFileNameToPathA when asked for a unicode string and URL_LocalFileNameToPathW fails. 2008-10-08 12:17:45 +02:00
Juan Lang
024c13c174 wininet: Trace the cache file entry's local file name rather than the passed-in cache entry info's local file name, as the caller may have passed a NULL pointer. 2008-10-08 12:17:37 +02:00
Rob Shearman
0c75ead3e8 wininet: Validate parameters passed to RetrieveUrlCacheEntryInfoA/W.
Add tests for this.
2008-10-08 12:16:59 +02:00
Rob Shearman
ab849ee297 wininet: Fix GetUrlCacheEntryInfoA/W when a NULL lpCacheEntryInfo parameter is passed in. 2008-10-06 13:07:43 +02:00
Rob Shearman
d929cdef97 wininet: Return error codes explicitly from URLCache functions instead of returning a BOOL and storing the error code in the last error value.
This makes the code more efficient and allows errors from functions to
be ignored without side-effects.
2008-10-06 13:07:36 +02:00
Colin Finck
a33d7fc8c9 Fix some hackish usages of WideCharToMultiByte. 2008-07-31 14:08:29 +02:00
Francois Gouget
eb16f43bdf Add some API documentation stubs to make winapi_check happy. 2008-07-28 11:34:45 +02:00
Lei Zhang
255eebe44d wininet: Handle NULL input for FindCloseUrlCache. 2008-05-08 22:48:30 +02:00
Andrew Talbot
07ae2992b8 wininet: Remove unused variables. 2008-05-05 12:52:26 +02:00
Rob Shearman
1ea7666c57 wininet: Don't crash in GetUrlCacheEntryInfoA/W if lpdwCacheEntryInfoBufferSize is NULL. 2008-04-30 17:00:02 +02:00
Louis Lenders
b3f7860917 wininet: Improve stub for FindNextUrlCacheEntryW a tiny bit. 2008-04-18 14:23:19 +02:00
Rob Shearman
99f651bd37 wininet: The lpszLocalFileName parameter to CommitUrlCacheEntryA is optional, so check before converting it from Unicode to ANSI. 2008-03-17 15:20:10 +01:00
Jacek Caban
e8be5eaba7 wininet: Don't use query and hash part of URL to generate cache file name. 2008-03-17 11:42:39 +01:00
Joris Huizer
4fca67e651 wininet: Fixed typos in two out-of-memory checks. 2008-03-13 20:44:18 +01:00
Rob Shearman
bcfb47e85b wininet: Fix local variable shadowing in URLCacheContainer_OpenIndex. 2008-03-12 19:21:38 +01:00
Rob Shearman
716ecc42f9 wininet: Support the lpszFileExtension "reserved" parameter being passed into CommitUrlCacheEntryA.
Store it in the URL cache entry and allow it to be retrieved by 
RetrieveUrlCacheEntryFile and other functions.
2008-03-12 17:58:37 +01:00
Rob Shearman
fee165ae47 wininet: The URL in CommitUrlCacheEntryInternal shouldn't be restricted to MAX_PATH chars in length.
Dynamically allocate it and consolidate cleanup at the end of the function.
2008-03-12 17:58:31 +01:00
Rob Shearman
cdd135c2f3 wininet: Fix URLCache_LocalFileNameToPathA to return a full path, rather than just the container path.
This was caused by path_len including the nul-terminator and so the rest 
of the string was being added after the nul-terminator, which is 
incorrect. This is fixed by making path_len not include the nul-terminator.

Also fix a few other issues with the function, like not passing a 
correct length into the second call to WideCharToMultiByte, nRequired 
being calculated incorrectly and the string not always being nul-terminated.

Add a test for this function by testing the lpszLocalFileName field 
obtained from RetrieveUrlCacheEntryFileA.
2008-03-12 17:58:20 +01:00
Rob Shearman
c46279ced7 wininet: Make some pointers const in URL cache functions. 2008-03-12 17:58:10 +01:00
Rob Shearman
f1af593988 wininet: Use LIST_FOR_EACH_ENTRY in URLCacheContainers_FindContainerW instead of LIST_FOR_EACH and LIST_ENTRY. 2008-03-12 17:58:03 +01:00
Rob Shearman
160bc04343 wininet: Move URL cache hash entry validation to a separate function. 2008-03-12 17:57:30 +01:00
Rob Shearman
7fde7aef78 wininet: Implement FindFirstUrlCacheEntry{A, W}, FindNextUrlCacheEntryA and FindCloseUrlCache. 2008-03-12 17:57:25 +01:00
Rob Shearman
2e99817a40 wininet: Fix the return value check of SHGetSpecialFolderPathW in URLCacheContainers_CreateDefaults.
It returns a BOOL, not an HRESULT.
2008-02-16 13:54:28 +01:00
Jacek Caban
f979134270 wininet: Code clean up. 2008-02-15 10:00:12 +01:00
Andrew Talbot
45481db078 wininet: Remove unneeded casts. 2008-02-05 12:19:37 +01:00