Hans Leidekker
690046e3d2
winhttp: Get rid of receive_response_t.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-15 13:42:05 +01:00
Hans Leidekker
7e5b5cb1aa
winhttp: Properly handle request paths with Unicode characters.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46076
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-06 21:04:04 +01:00
Hans Leidekker
b9e19685c5
winhttp: Simplify build_request_string.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-06 21:04:04 +01:00
Hans Leidekker
85b6c2b9c8
winhttp: Get rid of send_request_t.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-06 21:04:04 +01:00
Hans Leidekker
b603c5e05c
winhttp: Get rid of header_t.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-06 21:04:04 +01:00
Hans Leidekker
b995ed00a7
winhttp: Get rid of task_header_t.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-06 21:04:04 +01:00
Jacek Caban
543bfdf1af
winhttp: Make accessing session credential handle thread safe.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-05 09:13:01 -05:00
Hans Leidekker
ace7f05672
winhttp: Implement the WINHTTP_FLAG_ESCAPE_* flags.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=42677
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-04 09:11:26 -05:00
Michael Stefaniuc
9c1298a0e5
winhttp: Use the ARRAY_SIZE() macro.
...
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-26 16:50:27 +02:00
Michael Stefaniuc
8c8ea309a4
winhttp: Avoid a variable that holds an ARRAY_SIZE() result.
...
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-26 16:50:22 +02:00
Jacek Caban
6435f844dd
winhttp: Set last error in WinHttpQueryAuthSchemes when no auth scheme is found.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-19 18:21:20 +02:00
Jacek Caban
f76208879e
winhttp: Modify index only if query_headers succeeded.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-19 18:21:16 +02:00
Hans Leidekker
af3920dc18
winhttp: Implement WINHTTP_OPTION_RECEIVE_RESPONSE_TIMEOUT.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-11 11:11:39 +02:00
Hans Leidekker
ca56f99280
winhttp: Use winsock sockets.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-27 17:35:00 +02:00
Hans Leidekker
498042e0ee
winhttp: Escape untrusted URL paths.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-24 20:12:05 +02:00
Zhiyi Zhang
b55f568383
winhttp: Add support for WINHTTP_ENABLE_SSL_REVOCATION.
...
This also fixes a regression caused by 0b61334b9d
,
which is causing Office 2013 to fail to login, saying that there is a problem
with your account.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-24 20:12:05 +02:00
Michael Stefaniuc
ebc7959e17
winhttp: Use the more common ARRAY_SIZE spelling.
...
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-06 19:44:26 +02:00
Hans Leidekker
f5ea51d360
winhttp: Store the server certificate context in the request.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-11 16:35:51 +02:00
Hans Leidekker
6283f4ed96
winhttp: Fix invalid reads with tracing on (Valgrind).
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-04 16:53:13 +02:00
Huw Davies
6ce8624760
winhttp: Send basic authorization credentials with the first request if they've been set.
...
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-02 11:20:01 +02:00
Huw Davies
9c2cce0923
winhttp: Move the authorization code above send_request().
...
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-02 11:19:56 +02:00
Hans Leidekker
2b77b0bb6b
winhttp: Implement WINHTTP_OPTION_SECURE_PROTOCOLS.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-12 10:24:54 +02:00
Hans Leidekker
d71fcc93e4
winhttp: Allocate a credential handle for each session.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-12 10:24:52 +02:00
Nikolay Sivov
d0813b7718
winhttp: Avoid returning while holding a lock (Coverity).
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-08-08 20:53:08 +09:00
Sebastian Lackner
5a61913e90
winhttp: Rename host_t to hostdata_t.
...
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-19 22:52:54 +02:00
Jacek Caban
2a99f0e3b3
winhttp: Periodically free outdated connections.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-18 20:43:32 +02:00
Jacek Caban
5226865c53
winhttp: Cache and reuse persistent HTTP connections.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-18 20:43:32 +02:00
Jacek Caban
e0e8a3ff77
winhttp: Introduce global connected hosts store and keep reference to host in netconn_t.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-18 20:43:32 +02:00
Jacek Caban
d1d65c9b21
winhttp: Merge netconn_create and netconn_connect implementations.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-18 20:43:32 +02:00
Jacek Caban
3e60241677
winhttp: Store socked address in netconn_t.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-18 20:43:31 +02:00
Jacek Caban
e129023eb7
winhttp: Pass socket address as sockaddr_storage to netconn_connect.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-18 20:43:31 +02:00
Jacek Caban
c502629819
winhttp: Allocate netconn_t separately from request_t.
...
Once persistent connections will be supported, life time of connection
may exceed life time of request object.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-13 18:34:45 +02:00
Jacek Caban
c06104c62a
winhttp: Store security_flags in request_t instead of netconn_t.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-07-13 18:34:43 +02:00
Hans Leidekker
f2bb2064bf
winhttp: Reset content length when a redirect creates a new connection.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-22 22:52:54 +02:00
Hans Leidekker
09238973e8
winhttp: Only read as much data as advertized when draining content.
...
Fixes a regression caused by 2fa86fd661
.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-06-21 10:04:32 +02:00
Hans Leidekker
2fa86fd661
winhttp: Always drain content before sending the next request.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-12 19:03:50 +02:00
Hans Leidekker
6b6ffb399a
winhttp: Ignore unknown schemes in WinHttpQueryAuthSchemes.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-06 11:43:50 +02:00
Hans Leidekker
08603e565b
winhttp: Fix a memory leak in insert_header (Valgrind).
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-24 20:51:52 +01:00
Hans Leidekker
d3f7519035
winhttp: Don't drain content until authorization is handled successfully.
...
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2015-12-23 16:32:14 +01:00
Dmitry Timoshkov
01bfb3d6a6
winhttp: Add custom implementation of IWinHttpRequest::Invoke(DISPID_HTTPREQUEST_OPTION).
2015-10-01 00:04:06 +09:00
Hans Leidekker
d22e21f96d
winhttp: Verify certificates against the hostname instead of the server name.
...
The server name is different when connections are made through a proxy server.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
2015-09-25 21:01:15 +02:00
Hans Leidekker
58bf3ca17f
winhttp: Add support for retrieving the URL codepage.
2015-08-26 23:15:26 +09:00
Dmitry Timoshkov
d6e1e710ee
winhttp: Add support for WinHttpRequestOption_URLCodePage.
2015-08-24 18:41:35 +09:00
Michael Müller
d2890778f9
winhttp: Raw request headers need to be terminated with double \r\n.
2015-08-18 17:30:48 +09:00
Michael Müller
a533bf26ce
winhttp: Remove unused variable in read_reply().
2015-08-12 22:54:04 +09:00
Hans Leidekker
1def0982f1
winhttp: Always clear last error on success.
2015-08-03 20:50:33 +02:00
Huw Davies
50d9d187c5
winhttp: Don't wait for the task thread to exit.
...
Instead, have the task thread call the destructor before it exits.
Previously, if the task thread held the final reference, it would call
request_destroy which would then wait for itself to finish.
2015-07-21 17:38:13 +02:00
Hans Leidekker
2516fb7807
winhttp: Fix a couple of corner cases in header processing.
2015-06-24 22:56:29 +09:00
Hans Leidekker
9e96beefae
winhttp: Fix handling of the headers length parameter in WinHttpAddRequestHeaders and WinHttpSendRequest.
2015-06-17 22:37:06 +09:00
Hans Leidekker
b22ace7f7b
winhttp: Keep the session open in the request object.
...
Cookies have session scope in winhttp and they are not saved, so we
need to keep the session open to ensure that cookies are passed along
with subsequent requests.
2015-06-16 16:48:35 +09:00
Hans Leidekker
9736644ed5
winhttp: Correctly handle relative redirect paths.
2015-06-16 16:48:33 +09:00
Hans Leidekker
3b8a8d31dc
winhttp: Store credentials set with WinHttpSetCredentials separately from username and password set through options.
2015-06-15 14:45:51 +09:00
Hans Leidekker
e27a9bc6bc
winhttp: Don't try to read more data than available in the current chunk in refill_buffer.
2015-03-17 00:19:53 +09:00
Alexandre Julliard
0d7613fc98
winhttp: Remove const to fix a warning with the Microsoft headers.
2015-03-17 00:19:37 +09:00
Hans Leidekker
5505413a81
winhttp: Implement IWinHttpRequest::get_ResponseStream.
2015-02-16 23:28:34 +09:00
Hans Leidekker
6f046e0f51
winhttp: Return an error from winhttp_request_get_ResponseBody if the request is not sent.
2015-02-16 23:28:27 +09:00
Hans Leidekker
d6c9c984e5
winhttp: Implement a task queue for asynchronous requests.
...
This ensures that asynchronous calls are completed in the right order.
2015-02-16 23:28:22 +09:00
Hans Leidekker
27ba8c8343
winhttp: Don't try to read data after a HEAD request.
2015-01-21 18:08:07 +01:00
Nikolay Sivov
e606551c21
winhttp: Release typeinfos and typelib on dll unload.
2015-01-14 13:18:59 +01:00
Nikolay Sivov
3816e44da1
winhttp: Fix typeinfo refcount in GetTypeInfo().
2015-01-14 13:18:54 +01:00
Hans Leidekker
2087a9fbe9
winhttp: Don't try to read data when the server response is HTTP_STATUS_NO_CONTENT or HTTP_STATUS_NOT_MODIFIED.
...
Tests based on a patch by Bruno Jesus.
2014-12-09 13:17:03 +01:00
Hans Leidekker
97cd0291b0
winhttp: Check the return value of send_request.
2014-12-09 13:16:55 +01:00
Hans Leidekker
647abcafb6
winhttp: Convert the async parameter to VT_BOOL if necessary in IWinHttpRequest::Open.
2014-12-09 13:16:36 +01:00
Hans Leidekker
4ac817b6c0
winhttp: Fill the read buffer first in drain_content.
2014-12-09 13:16:32 +01:00
Hans Leidekker
1eb86e1fca
winhttp: Enable automatic authentication by default in the request object.
2014-12-09 13:16:28 +01:00
Hans Leidekker
0b366dca3c
winhttp: Verify the async parameter type in IWinHttpRequest::Open.
2014-09-15 16:41:10 +02:00
Nikolay Sivov
8fb0fd77e5
winhttp: Fix return code check (PVS-Studio).
2014-08-18 12:46:19 +02:00
Jacek Caban
d2886a05f9
wine/debug.h: Added debugstr_variant and debugstr_vt aliases and removed all duplicated implementations.
2014-07-24 17:05:55 +02:00
Hans Leidekker
6494c50ad7
winhttp: Fix a couple of memory leaks (valgrind).
2014-05-13 13:47:11 +02:00
Marcus Meissner
0fe44e1be6
winhttp: Avoid leaking authinfo on error (Coverity).
2014-04-17 10:45:11 +02:00
Dmitry Timoshkov
f8d79c83b4
winhttp: Remove unused IUnknown *outer parameter from object constructor.
2014-01-07 15:22:24 +01:00
Frédéric Delanoy
57d7f74d34
Assorted spelling fixes.
2013-11-21 19:44:46 +01:00
Jacek Caban
e894c897d5
winhttp: Moved netconn_query_data_available calls to query_data_available.
2013-11-15 19:23:24 +01:00
Jacek Caban
92426b5136
winhttp: Use netconn_query_data_available in get_available_data when possible.
2013-11-01 11:03:29 +01:00
Andrew Eikum
04f0426fe6
winhttp: Attempt to refill empty buffer before answering QueryDataAvailable.
2013-10-17 20:29:40 +02:00
Hans Leidekker
59b0374710
winhttp: Don't assume that end of chunk means end of stream.
2013-09-23 11:56:38 +02:00
Hans Leidekker
050a46f30f
winhttp: Fix the base64 decoder.
2013-09-04 21:36:55 +02:00
Hans Leidekker
fe678927dd
winhttp: Fix invalid parameter handling in WinHttpQueryAuthSchemes.
2013-08-19 19:04:23 +02:00
Hans Leidekker
78fc21cdb5
winhttp: Allow setting NULL username and password for NTLM, Passport and Negotiate.
2013-08-19 19:04:17 +02:00
Marcus Meissner
85f3fe735d
winhttp: Initialize schemes (Coverity).
2013-06-12 15:52:36 +02:00
Hans Leidekker
93637828b4
winhttp: Fix a memory leak.
...
Reported by Marcus Meissner.
2013-05-13 16:48:49 +02:00
Hans Leidekker
52ef52e085
winhttp: Get rid of the flags parameter to netconn_send.
2013-05-01 16:01:02 +02:00
Hans Leidekker
a506d0aa3b
winhttp: Add support for NTLM and Negotiate authentication.
2013-04-30 11:50:40 +02:00
Hans Leidekker
d63ef4d855
winhttp: Resend any request data when handling an authentication or redirect response.
2013-04-30 11:50:31 +02:00
Hans Leidekker
7a69d4dbfe
winhttp: Reset the content read counter.
2013-04-30 11:50:28 +02:00
Hans Leidekker
bb3097f01e
winhttp: Add a read-ahead buffer to allow WinHttpQueryDataAvailable to return the right values in chunked mode.
...
This is a port of wininet commit 3d02c42b39
.
2013-03-25 16:27:34 +01:00
Andrew Talbot
a9983e6cd2
winhttp: Avoid signed-unsigned integer comparisons.
2013-03-06 11:42:56 +01:00
Hans Leidekker
71874a38aa
winhttp: Make sure to clear response headers from a previous request.
2013-03-05 12:45:05 +01:00
Hans Leidekker
418d2ce523
winhttp: Implement WINHTTP_OPTION_REDIRECT_POLICY_DISALLOW_HTTPS_TO_HTTP.
2013-03-05 12:45:00 +01:00
Hans Leidekker
e56cb72cd3
winhttp: Add a helper to retrieve the redirect URL.
2013-03-05 12:44:54 +01:00
Hans Leidekker
58e7d39c7f
winhttp: Use symbolic constants for HTTP status codes.
2013-03-05 12:44:51 +01:00
Jacek Caban
42750e340e
winhttp: Removed no longer used netconn_init argument.
2013-02-21 19:16:32 +01:00
Hans Leidekker
10cb483cf1
winhttp: Add a missing goto in winhttp_request_get_Status.
2012-12-19 14:38:58 +01:00
Andrew Talbot
4be1fce0d1
winhttp: Remove unused variables.
2012-11-23 14:41:07 +01:00
Hans Leidekker
d488081214
winhttp: Respect the redirect policy setting.
2012-10-22 11:44:37 +02:00
Heiko Hund
1ba968821a
winhttp: Make strings in WINHTTP_PROXY_INFO non-const.
2012-07-19 16:01:18 +02:00
Hans Leidekker
189c1ca5d9
winhttp: Fix up headers with wrong termination.
2012-03-12 16:37:21 +01:00
Jan-Peter Nilsson
3de7348f72
winhttp: Set the context on the request handle earlier.
2012-02-20 11:49:02 +01:00
Hans Leidekker
ebc4fd1462
winhttp: Don't attempt to read data after receiving a response to a HEAD request.
2012-01-27 18:05:48 +01:00
Hans Leidekker
07ed66f8ec
winhttp: Also close the connection when there's nothing to read.
2012-01-27 18:05:47 +01:00