Commit Graph

392 Commits

Author SHA1 Message Date
Jacek Caban
e2933c20d6 wininet: Move INTERNET_OPTION_HANDLE_TYPE to vtbl. 2008-03-12 11:59:41 +01:00
Rob Shearman
0be05ab6aa wininet: Retrieve the maximum token length from the SSP and use a buffer of that length in calls to InitializeSecurityContextW.
Otherwise, InitializeSecurityContextW could run out of space with our
small, fixed buffer and fail.
2008-03-10 19:12:54 +01:00
Rob Shearman
7631bdf0c1 wininet: Allow HTTP_DoAuthorization to accept a NULL username/domain in the non-Basic case.
When using SSPI, pass in a NULL identity in this case so that the SSP
can try to use cached credentials.
2008-03-10 19:12:54 +01:00
Rob Shearman
8c6ac00820 wininet: Don't call DeleteSecurityContext and FreeCredentialsHandle on invalid handles. 2008-03-10 19:12:54 +01:00
Rob Shearman
bdc81d9963 wininet: Make the reference count of WININETHANDLEHEADER thread-safe by using InterlockedIncrement/InterlockedDecrement. 2008-03-10 19:12:54 +01:00
Jacek Caban
d597fd12fc wininet: Moved InternetReadFileExA to vtbl. 2008-03-03 20:45:31 +01:00
Jacek Caban
ca39a55e88 wininet: Don't use INTERNET_ReadFile in HTTP_DrainContent. 2008-03-03 12:00:32 +01:00
Jacek Caban
3b4ca69e18 wininet: Move InternetReadFile to vtbl. 2008-03-03 12:00:20 +01:00
Jacek Caban
9a5c046129 wininet: Move INTERNET_STATUS_REQUEST_COMPLETE call from INTERNET_ReadFile. 2008-03-03 12:00:06 +01:00
Jacek Caban
3314184597 wininet: Move InternetQueryDataAvailable to vtbl. 2008-02-29 20:07:13 +01:00
Jacek Caban
8c45eecca7 wininet: Moved InternetFindNextFileW implementation to vtbl. 2008-02-28 10:44:42 +01:00
Jacek Caban
0e33eee9a2 wininet: Use vtbl for InternetSetOption(INTERNET_OPTION_[SEND|RECEIVE]_TIMEOUT) implementation. 2008-02-27 14:52:25 +01:00
Jacek Caban
1ffcfbce85 wininet: Use vtbl in InternetWriteFile implementation. 2008-02-27 14:52:24 +01:00
Jacek Caban
7dc9bf677b wininet: Moved close_connection to vtbl. 2008-02-27 14:52:24 +01:00
Jacek Caban
5a535d6b23 wininet: Moved handle destructor to vtbl. 2008-02-27 14:52:24 +01:00
Maarten Lankhorst
5132fb4469 wininet: Fix retrieving raw headers. 2008-02-27 14:52:24 +01:00
Francois Gouget
abfa73b5c1 wininet: Document HttpAddRequestHeadersW()'s handling of the trailing '\0'. Fix tracing of the corresponding header strings as they may not be '\0' terminated. 2008-02-19 13:39:24 +01:00
Rob Shearman
719cd82f35 wininet: Fix potential buffer overrun in HttpQueryInfoA.
If HTTP_QUERY_CUSTOM is specified then the buffer contains a
null-terminated string on input and data of length len on output. The
code wasn't taking into account that the input len could be less than
the length of the string and thus could result in the allocated buffer
being overrun with the call to WideCharToMultiByte.
2008-02-19 13:39:24 +01:00
Hans Leidekker
9717113fcb wininet: Rename a function to better match what it does. 2008-02-18 13:33:52 +01:00
Hans Leidekker
2617fb6dea wininet: Handle the "100 Continue" response by ignoring it. 2008-02-18 13:33:33 +01:00
Hans Leidekker
d0033dbaed wininet: Honour the version override in HttpOpenRequest. 2008-02-18 13:33:10 +01:00
Rob Shearman
f8f9dbbbe7 wininet: Fix an off-by-one error in the boundary checks in HTTP_DecodeBase64. 2008-02-16 13:54:17 +01:00
Jacek Caban
f979134270 wininet: Code clean up. 2008-02-15 10:00:12 +01:00
Jacek Caban
d7a49e8147 wininet: Added beginning support for HTTP cache files. 2008-02-15 10:00:03 +01:00
Andrew Talbot
45481db078 wininet: Remove unneeded casts. 2008-02-05 12:19:37 +01:00
Hans Leidekker
b0912d1151 wininet: Add zero value content length header to POST requests only. 2008-02-04 14:18:51 +01:00
Hans Leidekker
c132dd9360 wininet: Send HTTP/1.1 requests by default. 2008-02-04 14:18:20 +01:00
Hans Leidekker
b069ef4268 wininet: Make sure not to overwrite any caller supplied authorization header. 2008-02-04 14:18:20 +01:00
Rob Shearman
59ab0cf362 wininet: HTTP_Connect should fail if a NULL or empty hostname is passed in.
Add tests for these circumstances.
2008-02-04 13:04:34 +01:00
Rob Shearman
5edcf3ab6c wininet: Pass the server name into InitializeSecurityContextW. 2008-01-25 12:30:08 +01:00
Gerald Pfeifer
3f1a20b8b1 wininet: Fix type of a loop variable in HTTP_BuildHeaderRequestStr(). 2008-01-14 15:31:37 +01:00
Austin English
0e4adae973 Spelling fixes. 2008-01-07 13:41:01 +01:00
Hans Leidekker
4d84eb26d0 wininet: Fix handling of host and referrer headers in HttpOpenRequest. 2008-01-07 12:02:12 +01:00
Marcus Meissner
fe475d9e88 wininet: Check return value of InternetCrackUrl when checking referrer host. 2008-01-03 13:30:26 +01:00
Rob Shearman
01826e0c98 wininet: Don't clear the auth data for Basic authentication in HTTP_InsertAuthorizationForHeader.
It isn't tracked per connection, unlike NTLM authentication, and so the 
server will return a 401 error and try to get us to authenticate again. 
However, this doesn't work as the authentication information is assumed 
by the code to be valid for the whole connection.
2007-11-27 16:42:26 +01:00
Juan Lang
9adf83e90d wininet: Don't use HEAP_ZERO_MEMORY on memory that's fully initialized. 2007-11-08 12:18:31 +01:00
Juan Lang
a1ab4a7eff wininet: Fix another typo. 2007-11-08 12:18:30 +01:00
Juan Lang
b210e3a751 wininet: Fix typo. 2007-11-08 12:18:30 +01:00
Nigel Liang
6f44627b04 wininet: Release object in HttpSendRequestExW before return on error. 2007-11-05 15:05:16 +01:00
Hans Leidekker
64359c2432 wininet: Always send a content length header, even if there is no content. 2007-10-29 13:06:50 +01:00
Juan Lang
d857c04c95 wininet: Don't assume lpBuffersIn is not NULL. 2007-10-23 12:23:52 +02:00
Nigel Liang
7d2ac2039b wininet: Release object in HttpEndRequestW after use. 2007-10-18 13:21:28 +02:00
Misha Koshelev
728e5fa559 wininet: Track child handles, free all child handles on WININET_FreeHandle as native. 2007-09-21 11:53:04 +02:00
Francois Gouget
d4337f2b5e wininet: Fix many wininet prototypes: the context is a DWORD_PTR now. 2007-08-30 17:02:49 +02:00
Misha Koshelev
0f117e568f wininet: Separate connection closing from object destruction. 2007-08-23 13:13:24 +02:00
Misha Koshelev
5320d3e3ea wininet: Don't send INTERNET_STATUS_HANDLE_CLOSING when closing handle opened with InternetOpen for HTTP connection. 2007-08-22 12:18:59 +02:00
Mikołaj Zalewski
3fa49f0f02 wininet: Make HttpQueryInfo[AW] work for lpBuffer == NULL and len > 0. 2007-08-16 11:52:06 +02:00
Mikołaj Zalewski
ab7d17727c wininet: Support HTTP_QUERY_RAW_HEADER_CRLF|HTTP_QUERY_FLAG_REQUEST_HEADERS. 2007-08-16 11:51:52 +02:00
Hans Leidekker
bb9413d77a wininet: Process caller supplied headers after inserting connection and authorization headers, not before. 2007-08-10 12:58:17 +02:00
Aric Stewart
c8dfc02bfb wininet: Strip Accept-Encoding from http/1.0 requests. 2007-07-27 12:47:51 +02:00
Rob Shearman
cb28969c2a wininet: Implement NTLM support for proxy authentication. 2007-06-06 12:11:34 +02:00
Jeremy White
7ad691a5ee wininet: Mark Proxy Authorization header as a request header, so it actually gets sent. 2007-06-01 12:40:22 +02:00
Rob Shearman
76507d475b wininet: Don't close the connection if the caller passes in zero for the number of bytes to be read.
Only close the connection when the bytes read equals the content length.

Fixup HTTP_DrainContent, which relied on the previous incorrect 
behaviour to instead close connections with no content length manually.
2007-05-29 13:49:02 +02:00
Rob Shearman
2e21d090cb wininet: Cope with non-nul-terminated header strings being passed to HttpSendRequestW. 2007-05-29 13:44:36 +02:00
Rob Shearman
4d1b8b1a4e wininet: Fix basic authentication by putting Basic directing into the scheme field, as the pszAuthValue can have an optional realm string appended. 2007-05-29 13:44:35 +02:00
Andrew Talbot
8ee390f6f5 wininet: Exclude unused headers. 2007-05-29 12:10:17 +02:00
Rob Shearman
7b94871c9f wininet: Pass context to InitializeSecurityContext in second parameter.
Otherwise, the call will now fail with SEC_E_INVALID_HANDLE.
2007-05-29 11:54:42 +02:00
Rob Shearman
847cc51d3b wininet: Implement basic non-proxy authentication. 2007-05-21 16:52:21 +02:00
Rob Shearman
4b507685e8 wininet: Add support for SSPI authentication for HTTP. 2007-05-21 16:52:10 +02:00
Andrew Talbot
46fc9c2e11 wininet: Constify some variables. 2007-02-26 13:38:37 +01:00
Hans Leidekker
2024f68753 wininet: Skip empty accept type strings in HttpOpenRequest. 2007-02-13 11:50:01 +01:00
Francois Gouget
aab5e5856e Don't put single quotes around '%s' when using the debugstr_*() functions. 2007-01-18 12:55:50 +01:00
Rob Shearman
1ec14b0b25 wininet: Fix HTTP_EncodeBasicAuth by passing an out buffer to the second set of character set conversion calls. 2007-01-17 11:24:09 +01:00
Rob Shearman
a9ebc706e3 wininet: Change HTTP_EncodeBase64 to operate on a series of bytes, instead of text.
Change HTTP_EncodeBasicAuth to convert the username and password into 
utf8 before base64 encoding.
2007-01-15 12:31:11 +01:00
Rob Shearman
9efe083ec5 wininet: HTTP_HttpQueryInfoW deals with bytes, not characters so update the callers that have this wrong assumption. 2007-01-15 12:30:53 +01:00
Rob Shearman
7b002a39b8 wininet: Allow a NULL value to be passed into HTTP_ProcessHeader
instead of crashing so that when used with the replace flag it will
delete an existing value.
2007-01-15 12:30:46 +01:00
Francois Gouget
e66d1cd5e9 wininet: Consistenly use INTERNET_SetLastError(). 2007-01-10 11:58:47 +01:00
Rob Shearman
47a8b86b53 wininet: Use Keep-Alive for HTTP requests if specified by the flags passed into HttpOpenRequest. 2007-01-08 12:39:50 +01:00
Rob Shearman
a9c2cfa8d9 wininet: Fix the handling of Accept types passed into HttpOpenRequest
by properly coalescing all the types into the Accept header value,
rather than just adding the first.
2007-01-08 12:39:47 +01:00
Rob Shearman
7e8ef764b8 wininet: Rename HTTP_Base64 to HTTP_EncodeBase64 to more accurately reflect what it does. 2007-01-08 12:39:42 +01:00
Rob Shearman
06b19b018a wininet: Fix the releasing of the wrong reference count in HTTP_CloseHTTPRequestHandle.
lpwhr obviously already has a reference count of 0 because it is being destroyed.
2007-01-04 21:17:53 +01:00
Rob Shearman
272954bd81 wininet: Change the HTTP code to not assume that the connection will be closed at the end of every request. 2007-01-04 21:17:34 +01:00
Rob Shearman
f0163ae7d6 wininet: Don't send callbacks in HTTP_CloseConnection if not connected. 2007-01-04 21:17:19 +01:00
Rob Shearman
ac1b527498 wininet: Use the Content-Length header to work out how much HTTP data there is left to be read
and don't try to read any more than what is available.
2007-01-04 21:17:12 +01:00
Rob Shearman
cf43b16036 wininet: Always send a Connection header set to "close" because that is what we expect for the moment. 2007-01-04 21:16:38 +01:00
Rob Shearman
14fb418942 wininet: Fix HTTP redirects by reseting loop_next after one loop. 2007-01-04 21:14:54 +01:00
Jacek Caban
49f5ee746c wininet: Get rid of ASYNC_FUNC enum. 2006-12-26 12:50:19 +01:00
Jacek Caban
c156845560 wininet: Use proc instead of enum in HTTPSENDREQUESTW request. 2006-12-26 12:48:09 +01:00
Rob Shearman
72575a06ca wininet: Make a function for resolving the server name for an HTTP request
and sending the appropriate callbacks and use it to remove some duplicated code.
2006-12-07 11:42:51 +01:00
Rob Shearman
4319ec6b83 wininet: Make HTTP_HandleRedirect no longer call HTTP_HttpSendRequestW.
Make the redirect handling in HTTP_HttpSendRequestW iterate instead of recurse.
2006-12-07 11:42:38 +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
5c53baac8d wininet: Inherit INET_CALLBACKW from parent handler. 2006-10-31 11:46:49 +01:00
Jacek Caban
760043c245 wininet: Call SendCallback in destructor instead of InternetCloseHandle. 2006-10-30 11:36:16 +01:00
Jacek Caban
957516f8e6 wininet: Remove lpwhparent from WININETHANDLERHEADER. 2006-10-30 11:36:02 +01:00
Jacek Caban
61a1cef6f6 wininet: Use lpHttpSession instead of lpwhcalback where possible. 2006-10-30 11:34:58 +01:00
Jacek Caban
a9bdc01e19 wininet: Store pointer to WININETHTTPSESSIONW in WININETHTTPREQUESTW. 2006-10-30 11:34:51 +01:00
Jacek Caban
a541a44f51 wininet: Use lpAppInfo instead of lpwhparent where possible. 2006-10-30 11:34:41 +01:00
Jacek Caban
c250617d88 wininet: Store WININETAPPINFOW pointer in WININETHTTPSESSIONW. 2006-10-30 11:34:21 +01:00
Jacek Caban
cc7a86ec7e wininet: Use HTTP_ADDHDR_FLAG_REPLACE flag in HTTP_HttpSendRequest to add Content-Length header. 2006-10-23 12:28:58 +02:00
Hans Leidekker
781f3f78a0 wininet: Cast-qual warnings fix. 2006-10-14 20:16:49 +02:00
Hans Leidekker
cd2c458588 wininet: Win64 printf format warning fixes. 2006-10-05 17:45:14 +02:00
Mike McCormack
739cd1ea32 wininet: Don't crash when querying NULL values. 2006-05-30 19:29:52 +02:00
Andrew Ziem
7053321926 wininet: Constify data. 2006-05-25 11:01:06 +02:00
Jonathan Ernst
360a3f9142 Update the address of the Free Software Foundation. 2006-05-23 14:11:13 +02:00
Mike McCormack
746bf215e0 wininet: Remove broken code for HTTP_QUERY_FLAG_COALESCE, which is unimplemented according to MSDN. 2006-05-15 11:04:50 +02:00
Mike McCormack
92ddc1c851 wininet: Clean up HTTP_GetCustomHeaderIndex. 2006-03-30 12:41:04 +02:00
Mike McCormack
7f5e273214 wininet: Use a lookup table sorted by index so we don't need a loop to do lookups. 2006-03-30 12:40:47 +02:00
Mike McCormack
ae300883fa WININET: Clean up HttpQueryInfo.
Fixes another return FALSE without SetLastError.
2006-03-30 12:40:05 +02:00
Mike McCormack
2571fa004a wininet: Make sure to set LastError when returning FALSE in HttpQueryInfo. 2006-03-30 12:38:14 +02: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
ef20936c53 wininet: Don't duplicate empty strings. 2006-03-10 21:40:57 +01:00
Robert Shearman
0590025e3c wininet: Fix redirects with relative URIs instead of absolute URIs. 2006-03-09 22:45:18 +01:00
Robert Shearman
9981f337e3 wininet: Don't continue to connect to a secure server without SSL support since it won't work.
Don't continue to connect to a secure server without SSL support since
it won't work. Return an error back to the application instead.
2006-03-06 20:00:21 +01:00
Robert Shearman
7a2357a480 wininet: Documentation fixes. 2006-02-14 11:34:14 +01:00
Aric Stewart
21712d3d15 wininet: Handle NULL lpBuffersIn in HttpSendRequestExW. 2006-01-13 13:52:38 +01:00
Jacek Caban
ad02317248 wininet: lpvStatusInfo in INTERNET_STATUS_NAME_RESOLVED,
INTERNET_STATUS_CONNECTING_TO_SERVER and
INTERNET_STATUS_CONNECTED_TO_SERVER should be strings, not
sockaddr_in.
2006-01-05 14:37:06 +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
Marcus Meissner
73893a74fd wininet: Reinitialise NETCON on redirect. 2005-12-13 11:12:09 +01:00
Aric Stewart
7bca41a739 wininet: Handle HTTP_QUERY_CUSTOM.
In HttpQueryInfo if dwInfoLevel includes HTTP_QUERY_CUSTOM then
lpBuffer is In/Out because the header we are querying is there.
Additionally standard headers can be queried in this manner as well
(such as Set-Cookie).
2005-12-08 12:44:45 +01:00
Aric Stewart
d30cec77d3 wininet: A->W bugfix.
When converting SendRequestExA -> W we need to set the lpcszHeader
parameter to NULL if the original one is NULL.
2005-12-08 11:54:24 +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
Robert Shearman
dc5f1cbd5d Remove call to StrCatW by passing in NULL for lpszExtraInformation in
the call to InternetCrackUrl, which concatenates the params onto the
path.
Some other minor cleanups.
2005-11-30 12:01:50 +01:00
Robert Shearman
4350357634 HttpSendRequestExA/W doesn't touch lpBuffersIn->Next, so simplify the
code a bit.
Modify test case to demonstrate this.
2005-11-29 11:42:23 +01:00
Robert Shearman
8a8ce9c4c7 More lpszServerName -> lpszHostName fixes. 2005-11-29 11:35:19 +01:00
Robert Shearman
efac01b525 Fix redirects from secure to non-secure and vice versa. 2005-11-29 11:25:31 +01:00
Robert Shearman
de2666fd5f Change all SendAsyncCallback calls into the synchronous
INTERNET_SendCallback where INTERNET_FLAG_ASYNC is already handled
properly.
2005-11-29 10:44:05 +01:00
Aric Stewart
1fc760d4a7 Allow HttpEndRequest to process 302 and 301 redirects. Append Host
port if non standard on the redirect host header and make sure to
append the extra information (parameters) and such to the location if
present.  Additionally check to see if we are redirecting to https and
if so set the appropriate port.
2005-11-28 17:31:02 +01:00
Robert Shearman
0e7c41e979 Add support for using secure (SSL/TLS) connections through a proxy
server.
2005-11-28 11:55:16 +01:00
Robert Shearman
13d371da54 Move the initiation of the SSL connection into a separate function. 2005-11-28 11:54:31 +01:00
Robert Shearman
3592110af7 Add a host port field that preserves the requested port of the
destination URL.
2005-11-28 11:53:05 +01:00
Robert Shearman
cc44f3a5c7 Fix "http://" prefix detection on the proxy URL. 2005-11-28 11:31:11 +01:00
Robert Shearman
0adec2b3dc Replace some useless checks in HTTP_AddProxyInfo with asserts. 2005-11-28 11:28:06 +01:00
Robert Shearman
225a9facd4 Simplify and fix Set-Cookie handling. 2005-11-28 11:24:41 +01:00
Robert Shearman
22edb3e99e Simplify HTTP_InsertProxyAuthorization. 2005-11-28 11:17:06 +01:00
Robert Shearman
29a436fd87 Add parsing of the Content-ID and Proxy-Connection headers.
Sort the table of header to option number mappings correctly.
Change a FIXME to a WARN because there are "X-..." headers that we
aren't supposed to parse.
2005-11-28 11:00:05 +01:00
Robert Shearman
7bb3463166 Add a new field "lpszHostName" to the session to track the host name
of the HTTP server, as opposed to the server that we will connect to
that could be a proxy server. Fixes the "Host:" header that we send to
servers.
2005-11-28 10:40:42 +01:00
Aric Stewart
ed0eba24f9 HttpEndRequest does not actually send an extra NULL byte at the end of
the request. Help from Rob Shearman on this one.
2005-11-22 16:18:48 +00:00
Aric Stewart
9e68c651d6 Fix some logic to allow HTTP_ADDREQ_FLAG_ADD to replace existing
headers. Also adding a test for some header adding flags.
2005-11-22 14:53:30 +00:00
Robert Shearman
b27457c91c Fix an incorrect entry in the HTTP header field table causing broken
Location field parsing.
2005-11-22 11:58:50 +00:00
Aric Stewart
be918f48b6 Implement HttpSendRequestEx and HttpEndRequest. Restructure, breaking
some things out of HTTP_SendRequestW to avoid duplicate code.
2005-11-21 15:17:55 +00:00
Robert Shearman
e6157dde9d We shouldn't pass the struct hostent returned from gethostbyname as
it's not thread-safe and isn't needed anyway.
2005-11-15 18:16:55 +00:00
Robert Shearman
79dc136a37 INTERNET_STATUS_HANDLE_CREATED notifications just send the handle, not
an INTERNET_ASYNC_RESULT structure.
The source handle in HTTP_Connect should be the parent's handle.
2005-11-15 12:01:59 +00:00
Francois Gouget
0edbaf7e80 Remove spaces before '\n' in traces. 2005-11-10 12:14:56 +00:00
Alexandre Julliard
dd281290e8 Authors: Marcus Meissner <marcus@jet.franken.de>, Walter Weiss <wjweiss@hotmail.com>
Added handling of more HTTP standard headers and binary search lists.
2005-11-01 18:06:54 +00:00
Jacek Caban
02708c6227 Make functions static. 2005-10-26 10:07:58 +00:00
Mike McCormack
403e58f5f4 Set the http port before figuring out whether we're using a proxy. 2005-10-19 19:07:08 +00:00
Aric Stewart
44cbdf2138 Use debugstr_a to prevent a buffer overflow when debugging. 2005-10-19 18:28:35 +00:00
Alexandre Julliard
7c1925a0f3 Remove the 'L' suffix on a number of constants to avoid comparison
errors on 64-bit platforms.
2005-09-13 15:00:32 +00:00
9c1d0cfc09 Wrong flags were being tested for INTERNET_FLAG_NO_AUTO_REDIRECT. 2005-09-07 11:26:34 +00:00
James Hawkins
92ba28851a Avoid heap corruption by not accessing old HeapReAlloc'ed pointer. 2005-08-24 09:44:59 +00:00
Maarten Lankhorst
e325f7ed82 Changed setting default port number from HTTP_Connect to
HttpOpenRequestW.
2005-06-21 20:02:34 +00:00
Mike McCormack
9b95bb526d Fix some warnings. 2005-06-13 19:05:42 +00:00
Peter Berg Larsen
e732fc023d Janitorial: Get rid of strncpy/strncpyW. 2005-03-28 14:17:51 +00:00
Francois Gouget
93416cdaf7 Assorted spelling fixes. 2005-03-23 13:15:18 +00:00
Robert Shearman
7707a765b7 - Fully delete custom headers on connection opening.
- Free unneeded memory on clearing of standard headers.
- Fix index sanity test in delete function.
2005-03-10 11:14:24 +00:00
David McCullough
10ff5e1e81 HTTP_HttpSendRequestW was getting invoked with a null verb, default to
the GET method.
2005-02-02 09:56:35 +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
Francois Gouget
da8b3dd7f2 Assorted spelling fixes. 2005-01-26 21:09:04 +00:00
Maxime Bellengé
e220907c71 Replace '\' with '/' in the URL in HTTP_HttpSendRequestW. 2005-01-25 16:43:17 +00:00
Diego Pettenò
869a66a8fd Get rid of DPRINTF. 2005-01-07 17:09:39 +00:00
Michael Stefaniuc
15a308a9d7 Do not check for non NULL pointer before HeapFree'ing it. It's
redundant.
2005-01-03 14:56:42 +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
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
Mike McCormack
c72d956b90 Make sure to insert the proxy authentication header if necessary. 2004-12-06 11:40:57 +00:00
Robert Shearman
b72a682751 Use dynamically allocated heap allocated buffers in
HTTP_InterpretHTTPHeader to avoid buffer overflow on large headers.
2004-09-23 22:53:50 +00:00
Robert Shearman
890977a18d Always replace whatever is already in the HTTP "Host" header. 2004-09-20 21:43:47 +00:00
Robert Shearman
ed517f3a8b InternetSetStatusCallback can be used on any handle and callbacks are
inherited by derived handles.
2004-09-20 19:10:31 +00:00
Robert Shearman
0e74f851e8 Don't let applications add Connection header to request. 2004-09-14 19:38:59 +00:00
Robert Shearman
37f2cc8274 Store HTTP host header in the same way as most other headers. 2004-09-13 19:33:17 +00:00
Robert Shearman
898baf674e - Remove unused variable hIC.
- Remove check for HTTP signature in server reply.
- Fix stupid error with freeing the wrong buffer.
2004-09-13 19:17:47 +00:00
Uwe Bonnes
66af8b5f60 Strip dangling \r\n from HTTP_HttpSendRequest. 2004-09-10 21:11:22 +00:00
Uwe Bonnes
5f289e766f Check for more standard headers. 2004-09-06 20:27:04 +00:00
Alexandre Julliard
754e7aa788 Added configure check for socklen_t. 2004-09-03 18:30:28 +00:00
Mike McCormack
08c6c698dd Fix the processing of the lpszHeaders field in HttpSendRequest. 2004-08-10 23:41:35 +00:00
Mike McCormack
13b6ce6da8 Fix warnings generated with -Wsign-compare. 2004-08-09 18:54:23 +00:00
Alexandre Julliard
d7357a4956 Fixed a couple of off-by-one errors. 2004-07-22 20:36:36 +00:00
Robert Shearman
4385d305e1 HttpQueryInfo returns buffer length including null terminator on
insufficient buffer length and buffer length excluding null terminator
on success:
- Fix HTTP_HttpQueryInfoW for these semantics.
- Fix HttpQueryInfoA to correctly copy the null terminator in the call
  to WideCharToMultiByte.
2004-07-21 21:17:03 +00:00
Mike McCormack
f1d7b14bf8 Fix HTTP POST requests. 2004-07-21 19:36:34 +00:00
Robert Shearman
907ac44aa7 Fix string length return from HttpQueryInfoA. 2004-07-20 01:21:08 +00:00
Mike McCormack
3a1391b8dd Use pointers internally and refcount all objects. 2004-07-19 21:49:39 +00:00
Robert Shearman
d6315926e6 Honour INTERNET_FLAG_NO_COOKIES. 2004-07-19 21:18:33 +00:00
Robert Shearman
dee8751ca8 Fix HttpQueryInfo(HTTP_QUERY_RAW_HEADERS*) so that it returns the
actual headers received, not just reconstituting them from processed
data.
2004-07-19 20:09:20 +00:00
Francois Gouget
817c520909 Assorted spelling fixes. 2004-07-16 19:15:40 +00:00
Alexandre Julliard
48243e32b9 Authors: Mike McCormack <mike@codeweavers.com>, Robert Shearman <rob@codeweavers.com>
- Change the way that the response headers are reconstructed to reduce
  the chance of memory being incorrectly allocated.
- Return the correct error when a header is not found.
- remove all the response headers before receiving new ones so that we
  don't merge headers from two responses.
- Add extra standard fields.
- Split the status line into http version, status code and status text
  and store those in the response data, without using use a fake
  field.
2004-07-15 18:57:32 +00:00
Robert Shearman
4cd38b4829 Accept headers without \r\n ending in HttpAddRequestHeaders. 2004-07-13 23:34:28 +00:00
Mike McCormack
a496906336 Build http requests in a more consistent way.
Fix the size of the request buffer.
Don't try converting the optional information from W to A.
2004-07-04 00:24:47 +00:00
Dimitrie O. Paun
f3b681a2ad Fix the function names in some of the comments. 2004-06-28 20:28:38 +00:00
Mike McCormack
b288f71e29 Pass pointers around internally instead of handles. 2004-06-14 17:57:26 +00:00
Mike McCormack
a9b405cf9a Fix proxy support, remove typecasts. 2004-06-01 20:19:56 +00:00
Kevin Koltzau
917df92356 Prevent memory leak and superfluous status notifications. 2004-05-13 05:17:25 +00:00
Francois Gouget
8fc374d8b4 Make Unicode strings 'static const'. 2004-04-20 02:14:00 +00:00
Francois Gouget
6a6c85c6d8 Make Unicode const strings static so they are not copied to the stack
each time we enter the function.
2004-04-19 20:12:14 +00:00
Alexandre Julliard
286fe0af18 Fixed a warning. 2004-04-13 00:19:58 +00:00
Mike McCormack
3462299c55 Convert unicode strings to const. 2004-04-12 23:13:53 +00:00
Alexandre Julliard
a2bf4d009b Fixed length handling in HttpQueryInfoW. 2004-03-31 20:09:54 +00:00
Mike McCormack
1baf39f95a Fix the HttpQueryInfoA function buffer size. 2004-03-30 20:37:49 +00:00
Mike McCormack
a4e902cbe1 Convert the wininet HTTP functions to Unicode. 2004-03-30 04:36:09 +00:00
Mike McCormack
09d2d47721 Convert WININETAPPINFOA structure to unicode. 2004-03-25 05:29:47 +00:00
Marcus Meissner
9d61aee357 Allocate the correct nr of bytes for lpszCookies in HTTP_HttpOpenRequestA.
Allocate the correct nr of bytes for request stringlen without options.
2004-03-22 21:31:44 +00:00
Marcus Meissner
8624ef4ab3 Allocate correct number of pointers for szAcceptTypes, since we need
it NULL terminated.
HeapReAlloc will modify the pointer, so store it there.
2004-03-22 20:40:46 +00:00
Uwe Bonnes
25efbc9dbc HTTP_HttpSendRequestA: Remove \r and \n at the end of
lpwhr->lpszPath.
2004-03-16 01:06:30 +00:00
Francois Gouget
ad5ff7ceeb Assorted spelling and case fixes. 2004-02-09 22:07:42 +00:00
Lionel Ulmer
1d5e6b6725 Better TRACEing in some functions. 2004-02-09 22:01:49 +00:00
Lionel Ulmer
e0e314780a Implemented proper asynchronous InternetOpenUrl handling. 2004-02-09 21:45:38 +00:00
Lionel Ulmer
a29b4c7cde Report real handles to the application, not Wine internal ones. 2004-02-09 20:55:58 +00:00
Mike McCormack
7cc70c0a8f Implement proper HINTERNET handles. 2004-02-07 01:03:41 +00:00
Uwe Bonnes
599c4522a8 HTTP_DealWithProxy: Only add http:// to proxy string when needed. 2003-12-15 19:47:31 +00:00
Jeremy Shaw
3cd1cfeaf9 Add a '\r\n' to lpszHeaders if it is not already terminated by
'\r\n'.
2003-12-11 04:25:41 +00:00