Commit Graph

207 Commits

Author SHA1 Message Date
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