Commit Graph

251 Commits

Author SHA1 Message Date
Jacek Caban 4adce67cf6 wininet: Use proc instead of enum in FTPUTFILE request. 2006-12-26 12:48:53 +01:00
Jacek Caban 662c885a0b wininet: Use proc instead of enum in INTERNETREADFILEEXA request. 2006-12-26 12:48:40 +01:00
Jacek Caban 8c3ca8d817 wininet: Use proc instead of enum in INTERNETOPENURLW request. 2006-12-26 12:48:30 +01:00
Jacek Caban 5dd5536a9a wininet: Remove not used HTTPOPENREQUESTW request. 2006-12-26 12:48:21 +01:00
Jacek Caban c156845560 wininet: Use proc instead of enum in HTTPSENDREQUESTW request. 2006-12-26 12:48:09 +01:00
Jacek Caban e30037f0d5 wininet: Use proc instead of enum in SENDCALLBACK request. 2006-12-26 12:47:57 +01:00
Andrew Talbot 4ef6043a57 wininet: Cast-qual warnings fix. 2006-11-22 11:45:05 +01:00
Rob Shearman 01425f603a wininet: Don't return an error for INTERNET_OPTION_SEND/RECEIVE_TIMEOUT not being implemented
on protocols other than HTTP, just print a FIXME. Reported by Michael Moss.
2006-11-02 21:57:17 +01:00
Jacek Caban 1031c5f9c6 wininet: Revert commit 760043c245.
After more testing I've checked that current code is bad, but my patch
was also wrong and causes regression in WoW.
2006-11-02 21:01:05 +01:00
Jacek Caban 7bd385b714 wininet: Use handle stored in WININETHANDLEHEADER instead of WININET_FindHandle. 2006-10-31 11:46:47 +01:00
Jacek Caban 760043c245 wininet: Call SendCallback in destructor instead of InternetCloseHandle. 2006-10-30 11:36:16 +01:00
Jacek Caban ae430f9323 wininet: Store handle in WININETHANDLEHEADER and use it in SendCallback. 2006-10-30 11:36:09 +01:00
Jacek Caban 957516f8e6 wininet: Remove lpwhparent from WININETHANDLERHEADER. 2006-10-30 11:36:02 +01:00
Jacek Caban 550ffef212 wininet: Store WININETFTPSESSIONW pointer in WININETFTPFILEW. 2006-10-30 11:35:56 +01:00
Jacek Caban 51ba292716 wininet: Store WININETFTPSESSIONW pointer in WININETFTPFINDNEXTW. 2006-10-30 11:35:43 +01:00
Jacek Caban 91312d7d57 wininet: Move ftp FindNextFile implementation to ftp.c. 2006-10-30 11:35:36 +01:00
Jacek Caban 2a50d52c04 wininet: Use lpAppInfo instead of lpwhparent where possible. 2006-10-30 11:35:18 +01:00
Francois Gouget 0a20f18a80 wininet: HttpSendRequestW() returns ERROR_IO_PENDING when called on an async socket. But that does not mean that it failed. 2006-10-20 14:10:41 +02:00
Hans Leidekker cd2c458588 wininet: Win64 printf format warning fixes. 2006-10-05 17:45:14 +02:00
Ulrich Czekalla f6c0a461ec wininet: Add INTERNET_OPTION_SECURITY_FLAGS stub to InternetSetOptionW. 2006-08-07 20:00:03 +02:00
James Hawkins a1544731db wininet: Add more tests for InternetCrackurl. 2006-07-17 13:46:11 +02:00
James Hawkins 545309c97f wininet: Error out if hInternet is a bad handle. 2006-07-06 12:05:09 +02:00
Mike McCormack 7b3cf21dc1 wininet: Remove some dead code (Coverity). 2006-06-02 20:43:58 +02:00
Jonathan Ernst 360a3f9142 Update the address of the Free Software Foundation. 2006-05-23 14:11:13 +02:00
Mike McCormack 2eec6b04c0 wininet: Return correct errors in InternetOpenUrlW. 2006-05-16 12:40:31 +02:00
Mike McCormack f57360af52 wininet: Return correct errors in InternetConnectW 2006-05-16 12:40:23 +02:00
Michael Stefaniuc a87520036f janitorial: Remove redundant NULL pointer checks before HeapFree'ing them.
Some HeapFree's are hidden behind macros. Found by smatch.
2006-05-10 11:31:41 +02:00
Robert Shearman 64ff0e54a3 wininet: Initialise the LPWITHREADERROR structure after it has been allocated. 2006-05-05 16:35:48 +02:00
Robert Shearman d133ff9afb wininet: Don't allocate memory for the thread error structure until it is needed.
Don't allocate memory for the thread error structure until it is
needed, as it is quite large and wastes memory for threads that don't
call any wininet function.
2006-04-20 15:16:52 +02:00
Robert Shearman dc03c0e3f3 wininet: Document InternetCrackUrlW. 2006-03-21 16:19:06 +01:00
Robert Shearman 80e4fb5975 wininet: InternetCreateUrlW should return the number of bytes needed.
InternetCreateUrlW should return the number of bytes needed to store
the URL, not the number of characters (reported by Sven Paschukat).
2006-03-21 16:19:06 +01:00
Robert Shearman 366fc247fc wininet: Make InternetCrackUrlW set the components related to net_loc
to NULL when net_loc isn't present in the input URL.
2006-03-14 17:51:51 +01:00
Robert Shearman 153aac0194 wininet: Move cookie-related stubs to cookie.c 2006-03-14 17:51:31 +01:00
Robert Shearman 5b5d45586e wininet: Implement setting of send and receive timeouts. 2006-03-14 17:50:41 +01:00
Robert Shearman 0252e5e875 wininet: Fix the conversion of NULL component values from InternetCreateUrlA. 2006-03-13 13:33:03 +01:00
Robert Shearman f18305b176 wininet: Host name isn't present when two slashes aren't present in InternetCrackUrl.
The test for "about:" in InternetCrackUrlW should be more general so
that only URLs without double slashes should also be assumed not to
have a host name.

Add another test for this case and remove an unreliable
InternetCreateUrl test.
2006-03-13 13:32:45 +01:00
Robert Shearman ae677d356c wininet: InternetCrackUrl should set nPort to the default port if not specified. 2006-03-13 13:32:20 +01:00
Robert Shearman e4adc07333 wininet: Fix an off-by-one error in InternetCreateUrlW.
Fix an off-by-one error in the size of buffer used to store the port
number in InternetCreateUrlW.
2006-03-09 22:47:50 +01:00
Robert Shearman b0fcaf9d48 wininet: Further InternetCreateFileW fixes.
- Add the slash after the port number.
- Only add the port number if the host name is present.
2006-03-09 22:47:35 +01:00
Robert Shearman d3047aaeba wininet: If necessary, add a slash between the hostname and path in
InternetCreateUrlW.
2006-03-09 22:47:16 +01:00
Robert Shearman 8eab78c235 wininet: More InternetCreateUrlW fixes.
- Don't add double slashes for opaque URLs.
- The default port number for all other schemes is 0.
2006-03-09 22:47:00 +01:00
Robert Shearman e58a448c4a wininet: Parse the scheme the string in InternetCreateFileW.
Parse the scheme the string in InternetCreateFileW and rewrite
url_uses_default_port using schemes instead of strings.
2006-03-09 22:46:45 +01:00
Robert Shearman 02839948d2 wininet: Get the string for the scheme if specified only by the
INTERNET_SCHEME enumeration in InternetCreateUrlW.
2006-03-09 22:46:30 +01:00
Robert Shearman 01219c65aa wininet: The host name is optional in InternetCreateUrlW. 2006-03-09 22:46:07 +01:00
Robert Shearman ed90c868a9 wininet: Use an array of schemes for mapping from a string to an INTERNET_SCHEME.
Use an array of schemes so that it can be re-used for mapping from
INTERNET_SCHEME back to a string and simplify the code in
GetInternetSchemeW.
2006-03-09 22:45:56 +01:00
Robert Shearman e2b7bc1efd wininet: Fix Trace in InternetCreateUrl.
The url passed in to InternetCreateUrl is an out parameter, so don't
dump it.
2006-03-09 22:45:26 +01:00
Robert Shearman 414d1ddeb9 wininet: Rewrite InternetCreateUrlW.
- Rewrite InternetCreateUrlW to respect the lengths passed in via the
  URL_COMPONENTS structure and fall back to a strlenW call when a
  length is zero.
- Expand the number of protocols supported when determining whether
  the port number should be added.
- Fix a test by passing in the correct length of scheme.
2006-03-06 20:00:53 +01:00
Victor Pelt 472ad3a450 wininet: Add stub for missing InternetSetOption. 2006-03-06 19:56:21 +01:00
Juan Lang 89529f8a8e wininet: Use CertNameToStr for INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT
and update comment.
2006-02-16 12:19:00 +01:00
Aric Stewart 8b0883576e wininet: INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT work.
Beginning of framework to implement handling of InternetQueryOption
for INTERNET_OPTION_SECURITY_CERTIFICATE_STRUCT.
2006-01-20 20:16:56 +01:00
Aric Stewart 1e946d3e14 wininet: HTTP headers reworking.
Redo how headers are handled, eliminating the concept of Standard
Headers and allow all headers to be added multiple times.
Allow querying of headers with an index to get the multiple headers.
Respect response vs request headers in HttpQueryInfo.
Add a number of tests to extensively test header adding and replacing.
2005-12-13 17:07:41 +01:00
Robert Shearman efd067f2c3 wininet: Correctly set the last error when a called Unix network
function fails.
2005-12-03 18:10:14 +01:00
Robert Shearman 067f09604a wininet: global function/data cleanup
Make some functions and a structure static since they are only used in
one file.
2005-12-03 18:03:08 +01:00
Robert Shearman f6252cf43e Remove duplicated code by modifying HTTP_HttpSendRequest so that it
can be used by both HttpSendRequest and HttpSendRequestEx.
Also allow HttpSendRequestEx to be used asynchronously.
2005-11-30 12:31:22 +01:00
Ge van Geldorp 1a1583a364 Match PSDK STATUS_* definitions. 2005-11-28 17:32:54 +01:00
Robert Shearman 8c8c81a1ef Change some SendAsyncCallback calls to INTERNET_SendCallback as the
tests show that the callbacks happen either synchronously or within an
alternative asynchronous call.
Remove a check for a NULL lpfnStatusCB that is already performed by
INTERNET_SendCallback and add a comment about a difference to native.
2005-11-28 11:00:18 +01:00
Francois Gouget d69268e77c Documentation tweaks to make winapi_check happy.
Also specify the documented spec file entry.
2005-11-23 20:14:04 +01:00
Robert Shearman 756f197945 Rename SendAsyncCallback to INTERNET_SendCallback. 2005-11-22 11:59:07 +00:00
Aric Stewart 526d3e51ee Implement the use of NETCON_send for HTTP connections when in
InternetWriteFile.
2005-11-21 11:57:33 +00:00
Robert Shearman f5af18f05f - Improve callback to give context sensitive information about the
different statuses and print the thread ID that it was called from.
- Replace the busy waiting on the "goon" flag with an event.
- Replace hard coded numbers with more informative constants
  throughout the InternetReadFile test.
- Add tests for InternetReadFileExA.
- Fix the error value from calling InternetReadFile with a NULL handle
  as indicated by the test.
2005-11-16 11:21:41 +00:00
Robert Shearman e87fe3a17f Correct the size of a callback parameter.
Fix the declaration of INTERNET_WorkerThreadFunc.
2005-11-15 18:12:42 +00:00
Saulius Krasuckas bc52612f77 Fix a test for InternetCreateUrlA as no Windows platform sets last
error here. Make InternetCreateUrlA pass the test.
2005-11-14 11:23:02 +00:00
Robert Shearman 01e91e5f6c Implement InternetReadFileExA (based on a patch by Brian Gerst). 2005-11-12 19:10:56 +00:00
Francois Gouget 0edbaf7e80 Remove spaces before '\n' in traces. 2005-11-10 12:14:56 +00:00
Vincent Béron 522b39bb42 Unicodify InternetCheckConnection.
Use HeapAlloc'ed buffers where applicable.
2005-11-08 16:09:20 +00:00
James Hawkins 1928ee8804 Implement InternetCreateUrlW and test cases. 2005-10-31 14:06:35 +00:00
James Hawkins 19ce8115a8 Correct parameter names for InternetSetFilePointer. 2005-10-28 10:08:44 +00:00
Vijay Kiran Kamuju ab80e557d7 Add default implementation for max_conn_pre_*_server flag.
Add stubs for the above flags in InternetSetOption.
2005-10-27 18:28:59 +00:00
Denis Lukianov d664711cae Use ICU_BROWSER_MODE in InternetCanonicalizeUrl. 2005-09-29 13:33:39 +00:00
Alexandre Julliard 20a1a203c6 Use a more portable scheme for storing the name of a critical
section.
2005-09-09 10:19:44 +00:00
Robert Shearman b1722b7ad7 As per MSDN, INTERNET_OPTION_CONNECTED_STATE should take a DWORD
instead of the INTERNET_CONNECTED_INFO structure.
2005-08-03 19:13:27 +00:00
Robert Shearman d89705daf6 Fix return value of InternetQueryDataAvailable. 2005-07-15 09:56:34 +00:00
Mike McCormack bda7ace2e9 Interlocked LONG* gcc warning fixes. 2005-07-13 11:59:15 +00:00
Robert Shearman 5cee3988bf Add stubs for some InternetSetOption options. 2005-06-30 10:13:50 +00:00
Maarten Lankhorst 6d6ca1e7c5 - Added new INTERNET_OPTION* defines.
- Fixed InternetSetOptionW unknown option handling, and added
  INTERNET_OPTION_DISABLE_PASSPORT_AUTH.
2005-06-21 20:02:21 +00:00
Mike McCormack 9b95bb526d Fix some warnings. 2005-06-13 19:05:42 +00:00
Mike Hearn 599f3e879e - Don't return NULL for proxy details if there is no proxy.
- Remove stub message, it seems to be complete.
2005-06-05 19:19:43 +00:00
Uwe Bonnes 29db8816b2 Handle more Escape situations. 2005-05-24 11:43:35 +00:00
Peter Berg Larsen 6e3bcb5a54 Replace strncpy with memcpy or lstrcpyn. 2005-04-18 10:30:55 +00:00
Benjamin Cutler 8c37f4362b Better handling of hInternet == NULL for INTERNET_OPTION_PROXY in
INET_QueryOptionHelper. MSDN says to return 'global proxy info' when
hInternet == NULL. Thanks to Juan Lang for helping with this.
2005-04-14 11:31:39 +00:00
Benjamin Cutler c2053e1ded Check for an invalid hInternet handle in INET_QueryOptionHelper for
INTERNET_OPTION_PROXY before attempting to use it.
2005-04-13 16:11:36 +00:00
Jason Edmeades 2f30d307df Ensure A->W version of InternetCrackURL passes correct length values,
and associated tests.
2005-04-11 16:10:50 +00:00
Juan Lang 6d83105054 - set size required correctly for all supported options
- tidy up a few lines of indenting in INET_QueryOptionHelper
- implement querying INTERNET_OPTION_PROXY
2005-04-11 14:26:18 +00:00
Francois Gouget 6b10c324c5 Assorted spelling fixes. 2005-03-30 17:08:31 +00:00
Peter Berg Larsen e732fc023d Janitorial: Get rid of strncpy/strncpyW. 2005-03-28 14:17:51 +00:00
Jakob Eriksson 9ed61de9a2 Get rid of HeapAlloc casts. 2005-03-24 21:01:35 +00:00
Hans Leidekker e82731a3c7 Add more tests and fix InternetTimeToSystemTimeW accordingly. 2005-03-17 18:55:41 +00:00
Hans Leidekker 6a8b67ca33 Stub implementations for DeleteUrlCacheContainer{A,W},
CreateCacheContainer{A,W}, FindFirstUrlCacheContainer{A,W},
FindNextUrlCacheContainer{A,W}.
Handle the case where the supplied buffer size is too small in
InternetQueryOption.
2005-02-08 13:43:09 +00:00
Hans Leidekker 6a367dbf8d - Stub implementations for FtpGetFileSize, FtpCommand{A,W},
HttpSendRequestExW, InternetGetLastResponseInfoW,
  InternetConfirmZoneCrossing{A,W}, InternetDial{A,W},
  InternetGoOnline{A,W}, InternetHangUp, CreateMD5SSOHash,
  InternetClearAllPerSiteCookieDecisions,
  InternetEnumPerSiteCookieDecision{A,W}, InternetGetCookieEx{A,W},
  InternetGetPerSiteCookieDecision{A,W},
  InternetSetPerSiteCookieDecision{A,W}, InternetSetCookieEx{A,W},
  ResumeSuspendedDownload, RetrieveUrlCacheEntryFileW,
  UnlockUrlCacheEntryFileW, {Create,Delete}UrlCacheEntryW,
  CommitUrlCacheEntryW, RetrieveUrlCacheEntryStreamW,
  FindCloseUrlCache, FindFirstUrlCacheEntryEx{A,W},
  FindFirstUrlCacheGroup, FindNextUrlCacheEntry{,Ex}{A,W},
  FindNextUrlCacheGroup, SetUrlCacheEntryGroup{A,W},
  {Get,Set}UrlCacheGroupAttribute{A,W}, SetUrlCacheConfigInfo{A,W}.
- Spec file stubs for new undocumented functions
  ForceNexusLookup{,ExW}, Ftp{Get,Put}FileEx, HttpCheckDavCompliance,
  InternetAlgIdToString{A,W}, InternetFortezzaCommand,
  InternetGetCertByURLA, InternetQueryFortezzaStatus,
  InternetSecurityProtocolToString{A,W}, InternetSetDialState{A,W},
  InternetShowSecurityInfoByURL{A,W}, IsUrlCacheEntryExpired{A,W},
  Privacy{Get,Set}ZonePreferenceW, RegisterUrlCacheNotification,
  UrlZonesDetach.
- Use memcpy instead of strncpy in InternetGetLastResponseInfoA.
- Add and improve some traces.
- Fix my own coding style in InternetTimeToSystemTimeW.
- Fix a couple of signedness warnings.
2005-02-01 18:50:53 +00:00
Hans Leidekker e9856f166b Implement and test InternetTime{From,To}SystemTime{A,W}.
Correct spelling in InternetCheckConnectionA.
2005-01-18 11:43:40 +00:00
Diego Pettenò 869a66a8fd Get rid of DPRINTF. 2005-01-07 17:09:39 +00:00
Mike McCormack 4a0f999859 Use CreateEventW in preference to CreateEventA for unnamed events. 2005-01-07 15:40:09 +00:00
Lionel Ulmer 58b1e2a4e9 Fix 'SendAsyncCallback' when it's really asynchronous. 2005-01-04 20:38:53 +00:00
Michael Stefaniuc 5ad7d858e0 Do not check for non NULL pointer before HeapFree'ing it. It's
redundant.
2004-12-23 17:06:43 +00:00
Lionel Ulmer d792a6af7b Added/improved TRACEing. 2004-12-23 11:18:29 +00:00
Michael Stefaniuc 7cb43c9dbe Do not check for non NULL pointer before HeepFree'ing it. It's
redundant.
2004-12-21 14:42:35 +00:00
Eric Pouech 4056d7ef8c Fixed some errors in function prototypes. 2004-12-13 21:19:01 +00:00
Eric Pouech 5c2a891c43 Made some functions and variables static. 2004-11-29 18:00:10 +00:00
Robert Shearman 0500a7d993 - Make InternetGetConnectedStateExA not crash, by making
InternetGetConnectedStateExW fill in the buffer correctly.
- Remove the dumping of strings that will only contain garbage.
- Document function.
2004-11-21 15:42:57 +00:00
Robert Shearman b1e361a93e Pass the address of the handle rather than just the handle to fix a
crash with IE.
2004-11-19 17:54:48 +00:00