Commit Graph

563 Commits

Author SHA1 Message Date
Hans Leidekker ed14aa9af7 winhttp: Fix macOS build.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-31 15:56:38 +02:00
Hans Leidekker 96a6053fed winhttp: Avoid double free on connection error.
Reported by Stefan Dösinger.

Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-08-27 17:35:03 +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
Detlef Riekenberg 054c916c40 winhttp/tests: Skip the tests when we encounter a failure.
This avoids entering the loop and flood the result file until we reach
the 120s test timeout.

Signed-off-by: Detlef Riekenberg <wine.dev@web.de>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-13 17:20:43 +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
Michael Stefaniuc cd4fac89c4 winhttp/tests: Use the available 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-06-12 14:01:35 +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 2752da05db winhttp: Ignore empty proxy strings read from the environment.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-23 17:34:01 +02:00
Hans Leidekker 0b61334b9d winhttp: Fix invalid option error returned from WinHttpSetOption.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-05-03 17:56:23 +02:00
Michael Stefaniuc 91040ba231 winhttp: Use the global HeapAlloc() wrappers.
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-02-06 12:58:59 +01:00
Andrey Gusev 67e80856e6 winhttp/tests: Fix resource leak.
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-05 17:33:39 +01:00
Andrey Gusev 4c8cb19708 winhttp/tests: Remove redundant comparison.
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-03 13:23:15 +01:00
Hans Leidekker 05cf71be99 winhttp/tests: Fix an intermittent test failure on Windows XP/Vista.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-22 16:59:27 +01:00
Andrey Gusev 72052ca6c7 winhttp/tests: Fix typos in ok() messages.
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-12-22 16:59:27 +01:00
Andrey Gusev 8fc6b58df4 winhttp: Remove redundant comparison.
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-05 10:34:20 +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
Hans Leidekker 9b3b5fd0c0 winhttp: Trace errors from send and recv.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-09-12 10:24:50 +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 fa2cc9868b winhttp/tests: Added persistent connection tests.
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 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 c2f464decb winhttp: Get rid of no longer needed netconn_init.
Spotted by Hans.

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-14 22:54:03 +02:00
Jacek Caban 4620bcf806 winhttp/tests: Make sure that all notifications were called before the end of a test.
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-14 17:19:24 +02:00
Jacek Caban 8c9df5b774 winhttp: Use notification flags to explicitly mark notifications that should signal an event.
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-14 17:19:20 +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
Jacek Caban bbb2f363a0 winhttp/tests: Make notification tests more strict.
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-12 11:45:26 +02:00
Jacek Caban fc33e982d7 winhttp/tests: Get rid of unneeded Sleep() call.
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-03 10:47:05 +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
Alistair Leslie-Hughes ae4ad49c75 winhttp/tests: Test when large amount of data is returned from a 401.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-12 19:03:41 +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
Alistair Leslie-Hughes eb3cb33820 winhttp/tests: Added multi Authenticate header test.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-05 16:39:55 +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 2786df2373 winhttp/tests: Fix two memory leaks.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-21 12:03:18 +01:00
Hans Leidekker be78574632 winhttp: Cookie attributes are case-insensitive.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-21 12:03:15 +01:00
Hans Leidekker 8595cc5386 winhttp: Parse cookie attributes.
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-21 12:03:10 +01:00
Francois Gouget c43dd195de winhttp: Add __WINE_ALLOC_SIZE attributes to heap_xxx() functions.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-15 16:16:40 +01:00