Daniel Stenberg [Wed, 5 Feb 2014 14:31:29 +0000 (15:31 +0100)]
http2: minor update of the README
Fabian Frank [Wed, 5 Feb 2014 08:21:16 +0000 (00:21 -0800)]
http2: rely on content-encoding header
A server might respond with a content-encoding header and a response
that was encoded accordingly in HTTP-draft-09/2.0 mode, even if the
client did not send an accept-encoding header earlier. The server might
not send a content-encoding header if the identity encoding was used to
encode the response.
See:
http://tools.ietf.org/html/draft-ietf-httpbis-http2-09#section-9.3
Dan Fandrich [Tue, 4 Feb 2014 20:49:10 +0000 (21:49 +0100)]
tool_operate: shortened too-long source line
Steve Holme [Sun, 2 Feb 2014 15:37:28 +0000 (15:37 +0000)]
tool_operate: Introduced operate_free() function
Steve Holme [Sun, 2 Feb 2014 15:28:25 +0000 (15:28 +0000)]
tool_operate: Introduced operate_init() function
Steve Holme [Sun, 2 Feb 2014 15:20:37 +0000 (15:20 +0000)]
tool_operate: Introduced new operate() function
Daniel Stenberg [Tue, 4 Feb 2014 14:07:08 +0000 (15:07 +0100)]
http2: enforce gzip auto-decompress
As this is mandated by the http2 spec draft-09
Tatsuhiro Tsujikawa [Tue, 4 Feb 2014 13:57:29 +0000 (14:57 +0100)]
http2: handle incoming data larger than remaining buffer
Tatsuhiro Tsujikawa [Sun, 2 Feb 2014 12:31:13 +0000 (21:31 +0900)]
http2: Check stream ID we are interested in
Tatsuhiro Tsujikawa [Tue, 4 Feb 2014 13:54:42 +0000 (14:54 +0100)]
http2: store response header in temporary buffer
Tatsuhiro Tsujikawa [Fri, 31 Jan 2014 15:51:24 +0000 (00:51 +0900)]
HTTP2: add layer between existing http and socket(TLS) layer
This patch chooses different approach to integrate HTTP2 into HTTP curl
stack. The idea is that we insert HTTP2 layer between HTTP code and
socket(TLS) layer. When HTTP2 is initialized (either in NPN or Upgrade),
we replace the Curl_recv/Curl_send callbacks with HTTP2's, but keep the
original callbacks in http_conn struct. When sending serialized data by
nghttp2, we use original Curl_send callback. Likewise, when reading data
from network, we use original Curl_recv callback. In this way we can
treat both TLS and non-TLS connections.
With this patch, one can transfer contents from https://twitter.com and
from nghttp2 test server in plain HTTP as well.
The code still has rough edges. The notable one is I could not figure
out how to call nghttp2_session_send() when underlying socket is
writable.
Fabian Frank [Tue, 4 Feb 2014 08:10:37 +0000 (00:10 -0800)]
gtls: add ALPN support
Add ALPN support when using GnuTLS >= 3.2.0. This allows
libcurl to negotiate HTTP/2.0 for https connections when
built with GnuTLS.
See:
http://www.gnutls.org/manual/gnutls.html#Application-Layer-Protocol-Negotiation-_0028ALPN_0029
http://tools.ietf.org/html/draft-ietf-tls-applayerprotoneg-04
Steve Holme [Sun, 2 Feb 2014 15:11:22 +0000 (15:11 +0000)]
tool_operate: Moved libcurl information gathering to tool_main
Fabian Frank [Mon, 3 Feb 2014 02:33:28 +0000 (18:33 -0800)]
openssl: add ALPN support
Add ALPN support when using OpenSSL. This will offer ALPN and NPN to the
server, who can respond with either one or none of the two. OpenSSL >=
1.0.2 is required, which means as of today obtaining a snapshot from
ftp://ftp.openssl.org/snapshot/.
See:
http://tools.ietf.org/html/draft-ietf-tls-applayerprotoneg-04
https://github.com/openssl/openssl/blob/
ba168244a14bbd056e502d7daa04cae4aabe9d0d/ssl/ssl_lib.c#L1787
Steve Holme [Sun, 2 Feb 2014 14:58:25 +0000 (14:58 +0000)]
tool_operate: Moved command line argument parsing into separate function
Steve Holme [Sun, 2 Feb 2014 14:29:54 +0000 (14:29 +0000)]
tool_operate: Simplified parse .curlrc decision logic
Steve Holme [Sun, 2 Feb 2014 14:21:53 +0000 (14:21 +0000)]
tool_operate: Moved main initialisation and cleanup code into tool_main
Steve Holme [Mon, 3 Feb 2014 12:16:22 +0000 (12:16 +0000)]
tool_main: Fixed compilation warning from commit
0104678c79
no previous prototype for function 'memory_tracking_init'
Steve Holme [Sun, 2 Feb 2014 13:58:35 +0000 (13:58 +0000)]
tool_main: Changed stack based config struct to be heap based
Dan Fandrich [Sun, 2 Feb 2014 23:23:34 +0000 (00:23 +0100)]
tests: Moved some comments so the test data files parse as XML
Steve Holme [Sun, 2 Feb 2014 13:45:35 +0000 (13:45 +0000)]
tool_operate: Moved memory tracking initialisation into tool_main
Steve Holme [Sun, 2 Feb 2014 11:01:10 +0000 (11:01 +0000)]
tests: Fixed test172 cookie expiry
The test contains a cookie jar file where one of the cookies has an
expiry date of
1391252187 -- Sat, 1 Feb 2014 10:56:27 GMT which has
now expired. Updated to Wed, 14 Oct 2037 16:36:33 GMT as per test
179.
Reported-by: Adam Sampson
Bug: http://curl.haxx.se/bug/view.cgi?id=1330
Steve Holme [Sat, 1 Feb 2014 13:36:48 +0000 (13:36 +0000)]
tool_operate: Moved initial config setup into new init_config() function
Steve Holme [Sat, 1 Feb 2014 13:26:09 +0000 (13:26 +0000)]
tool_main: Moved config struct initialisation into a separate function
In preparation for adding URL specific options moved the initialisation
of the Configurable structure into a separate function in tool_cfgable.
Marc Hoersken [Sat, 1 Feb 2014 00:01:10 +0000 (01:01 +0100)]
test 500: workaround low timer resolution on Windows
Since the timer resolution is lower, there are actually cases that
the compared values are equal. Therefore we check for previous
timestamps being greater than the current one instead.
Marc Hoersken [Sat, 1 Feb 2014 12:49:58 +0000 (13:49 +0100)]
test suite: stop conversion of valid output to CRLF on Windows
Since the output isn't actually being written in text-mode and it
was rather used as a workaround, disable text-mode for these tests.
Marc Hoersken [Sat, 1 Feb 2014 12:47:00 +0000 (13:47 +0100)]
HTTP tests: use CRLF as header seperator according to RFC 2616
Marc Hoersken [Sat, 1 Feb 2014 12:43:19 +0000 (13:43 +0100)]
FTP tests: enable text-mode for more datacheck sections
Marc Hoersken [Sun, 26 Jan 2014 10:32:44 +0000 (11:32 +0100)]
FTP tests: enable text-mode for data and datacheck sections
Marc Hoersken [Sun, 26 Jan 2014 10:31:52 +0000 (11:31 +0100)]
runtests.pl: added support for text-mode within datacheck section
Marc Hoersken [Sun, 26 Jan 2014 10:30:41 +0000 (11:30 +0100)]
ftpserver.pl: directory LISTings use [CR][LF] for ASCII transfer
According to section 2.2 of RFC959 the End-of-Line is defined as:
The end-of-line sequence defines the separation of printing
lines. The sequence is Carriage Return, followed by Line Feed.
Verified by sniffing traffic between a Windows FTP client (FileZilla)
and Unix-hosted FTP server (ProFTPD).
Marc Hoersken [Sun, 26 Jan 2014 10:23:11 +0000 (11:23 +0100)]
runtests.pl: reverse line-ending conversion on Windows
It makes more sense to convert the expected output to [CR][LF] on
Windows than to force the actual, probably correct, output to [LF].
This way it is actually possible to see if curl outputs the correct
line-ending excepted by a text-aware test case.
Marc Hoersken [Sun, 19 Jan 2014 13:13:21 +0000 (14:13 +0100)]
winssl: improved default SSL/TLS protocol selection
For some reason Windows 7 SP1 chooses TLS 1.0 instead of TLS 1.2
if it is not explicitly enabled within grbitEnabledProtocols.
More information can be found on MSDN:
http://msdn.microsoft.com/library/windows/desktop/
aa379810.aspx
Steve Holme [Fri, 31 Jan 2014 00:25:11 +0000 (00:25 +0000)]
INSTALL: Corrected mentioned version number as release 7.34.1 became 7.35.0
Steve Holme [Fri, 31 Jan 2014 00:20:32 +0000 (00:20 +0000)]
RELEASE-NOTES: Synced with
0f213fdca1
Dan Fandrich [Thu, 30 Jan 2014 23:05:36 +0000 (00:05 +0100)]
pipeline: Fixed a NULL pointer dereference on OOM
Dan Fandrich [Thu, 30 Jan 2014 22:18:20 +0000 (23:18 +0100)]
tests: make the authorization retry tests pass the torture tests
Dan Fandrich [Wed, 29 Jan 2014 21:40:57 +0000 (22:40 +0100)]
ftp: fixed a memory leak on wildcard error path
Dan Fandrich [Wed, 29 Jan 2014 07:10:26 +0000 (08:10 +0100)]
netrc: Fixed a memory leak in an OOM condition
Steve Holme [Thu, 30 Jan 2014 20:59:26 +0000 (20:59 +0000)]
ntlm: Fixed a memory leak when using NTLM with a proxy server
Steve Holme [Thu, 30 Jan 2014 20:51:34 +0000 (20:51 +0000)]
tests: Missed updating a type-3 message in commit
1c9aaa0bac
Daniel Stenberg [Thu, 30 Jan 2014 19:22:54 +0000 (20:22 +0100)]
http2: fix size check in on_data_chunk_recv
Daniel Stenberg [Thu, 30 Jan 2014 17:21:57 +0000 (18:21 +0100)]
http2: add CRLF when first data arrives
Steve Holme [Thu, 30 Jan 2014 19:11:21 +0000 (19:11 +0000)]
tests: Updated NTLM tests for NTLMv2 type-3 message
Tatsuhiro Tsujikawa [Thu, 30 Jan 2014 16:49:35 +0000 (17:49 +0100)]
http2_recv: Return written length on CURLE_AGAIN
Tatsuhiro Tsujikawa [Thu, 30 Jan 2014 14:26:20 +0000 (23:26 +0900)]
http2: Use nghttp2_session_mem_recv and nghttp2_session_upgrade
Daniel Stenberg [Thu, 30 Jan 2014 15:32:03 +0000 (16:32 +0100)]
http2: call it "HTTP 2" and not 2.0
The minor version will be dropped for HTTP 2 so it will make sense to
avoid using it in option names etc.
Daniel Stenberg [Thu, 30 Jan 2014 15:09:36 +0000 (16:09 +0100)]
http2: basic version of receiving DATA
Daniel Stenberg [Thu, 30 Jan 2014 14:58:07 +0000 (15:58 +0100)]
http2: convert HEADER frames to HTTP1-like headers
... and then go through the "normal" HTTP engine.
Daniel Stenberg [Thu, 30 Jan 2014 13:31:05 +0000 (14:31 +0100)]
http2: fix EWOULDBLOCK in recv_callback()
Daniel Stenberg [Thu, 30 Jan 2014 13:26:00 +0000 (14:26 +0100)]
http2: do the POST Upgrade dance properly
Steve Holme [Thu, 30 Jan 2014 11:38:30 +0000 (11:38 +0000)]
ntlm: Use static client nonce for the test suite
Daniel Stenberg [Thu, 30 Jan 2014 10:46:59 +0000 (11:46 +0100)]
http2.h: provide empty macros for non-http2 builds
Fabian Frank [Thu, 30 Jan 2014 05:28:50 +0000 (21:28 -0800)]
http2: switch into http2 mode if NPN indicates
Check the NPN result before preparing an HTTP request and switch into
HTTP/2.0 mode if necessary. This is a work in progress, the actual code
to prepare and send the request using nghttp2 is still missing from
Curl_http2_send_request().
Daniel Stenberg [Thu, 30 Jan 2014 10:32:04 +0000 (11:32 +0100)]
http2: s/Curl_http2_request/Curl_http2_request_upgrade
To better reflect its purpose
Daniel Stenberg [Thu, 30 Jan 2014 10:24:15 +0000 (11:24 +0100)]
http2-openssl: verify that NPN functionality is present
Fabian Frank [Thu, 30 Jan 2014 05:18:03 +0000 (21:18 -0800)]
openssl: set up hooks with to perform NPN
NPN is what is available in the wild today to negotiate SPDY or HTTP/2.0
connections. It is expected to be replaced by ALPN in the future. If
HTTP/2.0 is negotiated, this is indicated for the entire connection and
http.c is expected to initialize itself for HTTP/2.0 instead of
HTTP/1.1.
see:
http://technotes.googlecode.com/git/nextprotoneg.html
http://tools.ietf.org/html/draft-ietf-tls-applayerprotoneg-04
Daniel Stenberg [Wed, 29 Jan 2014 23:11:56 +0000 (00:11 +0100)]
http2: added stubs for all nghttp2 callbacks
This makes it easier to trace what's happening.
Daniel Stenberg [Wed, 29 Jan 2014 22:47:24 +0000 (23:47 +0100)]
http2: use FIRSTSOCKET instead of 0 to index the sockets array
Daniel Stenberg [Wed, 29 Jan 2014 22:45:24 +0000 (23:45 +0100)]
http2: receive and log the received header frames
Daniel Stenberg [Wed, 29 Jan 2014 22:20:46 +0000 (23:20 +0100)]
http2_recv: log nghttp2 return codes for debugging purposes
Daniel Stenberg [Wed, 29 Jan 2014 21:53:08 +0000 (22:53 +0100)]
HTTP2: reject nghttp2 versions before 0.3.0
Gisle Vanem [Wed, 29 Jan 2014 21:52:22 +0000 (22:52 +0100)]
http2: adjusted to newer nghttp2_session_callbacks struct
the number of elements in the 'nghttp2_session_callbacks' structure is
now reduced by 2 in version 0.3.0 (I'm not sure when the change
happened, but checking for ver 0.3.0 work for me).
Gisle Vanem [Wed, 29 Jan 2014 21:50:25 +0000 (22:50 +0100)]
HTTP2: Wrong NgHTTP2 user-data
Something is wrong in 'userp' for the HTTP2 recv_callback(). The
session is created using bogus user-data; '&conn' and not 'conn'.
I noticed this since the socket-value in Curl_read_plain() was set to a
impossible high value.
Daniel Stenberg [Wed, 29 Jan 2014 21:42:34 +0000 (22:42 +0100)]
NTLM: error: conversion to 'int' from 'long int' may alter its value
Fixed two compiler nits
Steve Holme [Wed, 29 Jan 2014 20:50:33 +0000 (20:50 +0000)]
ntlm: Coding style policing dating back to 2011
Steve Holme [Sun, 26 Jan 2014 14:20:55 +0000 (14:20 +0000)]
ntlm: Use a timestamp of 01/01/1970 for the test suite
Steve Holme [Sun, 26 Jan 2014 14:04:46 +0000 (14:04 +0000)]
ntlm: Updated Curl_ntlm_core_mk_ntlmv2_resp() to use local variables
...until the function is successful when it returns them in the out
parameters.
Steve Holme [Sat, 25 Jan 2014 16:35:19 +0000 (16:35 +0000)]
ntlm: Added cross platform support for writing NTLMv2 timestamp in buffer
Added conversion functions write32_le() and write64_le() to ensure the
NTLMv2 timestamp is always written in little-endian.
Prash Dush [Fri, 24 Jan 2014 13:01:29 +0000 (13:01 +0000)]
ntlm: Added support for NTLMv2
Kamil Dudka [Wed, 29 Jan 2014 12:03:46 +0000 (13:03 +0100)]
nss: do not use the NSS_ENABLE_ECC define
It is not provided by NSS public headers.
Bug: https://bugzilla.redhat.com/1058776
Kamil Dudka [Wed, 29 Jan 2014 11:55:36 +0000 (12:55 +0100)]
nss: do not fail if NSS does not implement a cipher
... that the user does not ask for
Daniel Stenberg [Wed, 18 Sep 2013 20:43:13 +0000 (22:43 +0200)]
http2: switch recv/send functions to http2 ones after 101
Daniel Stenberg [Thu, 12 Sep 2013 11:51:04 +0000 (13:51 +0200)]
http2: handle 101 responses and switch to HTTP2
Daniel Stenberg [Wed, 29 Jan 2014 09:22:40 +0000 (10:22 +0100)]
examples: gitignore more binaries
Daniel Stenberg [Wed, 29 Jan 2014 07:35:58 +0000 (08:35 +0100)]
bump: start working on 7.35.1
Daniel Stenberg [Wed, 29 Jan 2014 07:34:51 +0000 (08:34 +0100)]
THANKS: 19 new contributors from the 7.35.0 release notes
Daniel Stenberg [Tue, 28 Jan 2014 22:59:08 +0000 (23:59 +0100)]
RELEASE-NOTES: done for 7.35.0
Dan Fandrich [Tue, 28 Jan 2014 23:31:00 +0000 (00:31 +0100)]
tests: make a few lib15?? tests pass the OOM torture tests
Dan Fandrich [Tue, 28 Jan 2014 23:14:35 +0000 (00:14 +0100)]
lib1900: make the test pass the OOM torture tests
Dan Fandrich [Tue, 28 Jan 2014 22:55:04 +0000 (23:55 +0100)]
oauth2: Fixed a memory leak in an OOM condition
Dan Fandrich [Tue, 28 Jan 2014 22:47:20 +0000 (23:47 +0100)]
unit1304: make the test pass the OOM torture tests
Dan Fandrich [Tue, 28 Jan 2014 22:23:24 +0000 (23:23 +0100)]
unit1396: make the test pass the OOM torture tests
Romulo A. Ceccon [Tue, 28 Jan 2014 13:59:14 +0000 (11:59 -0200)]
hostip: don't remove DNS entries that are in use
hostcache_timestamp_remove() should remove old *unused* entries from the
host cache, but it never checked whether the entry was actually in
use. This complements commit
030a2b8cb.
Bug: http://curl.haxx.se/bug/view.cgi?id=1327
Dan Fandrich [Tue, 28 Jan 2014 21:23:31 +0000 (22:23 +0100)]
RELEASE-NOTES: changed encoding to UTF-8 like previous releases
Daniel Stenberg [Tue, 28 Jan 2014 19:39:25 +0000 (20:39 +0100)]
TFTP: fix crash on time-out
tftp_done() can get called with its TFTP state pointer still being NULL
on an early time-out, which caused a segfault when dereferenced.
Reported-by: Glenn Sheridan
Bug: http://curl.haxx.se/mail/lib-2014-01/0246.html
Steve Holme [Tue, 28 Jan 2014 13:52:06 +0000 (13:52 +0000)]
RELEASE-NOTES: Synced with
5a47062cada9
Maks Naumov [Mon, 27 Jan 2014 14:52:42 +0000 (16:52 +0200)]
getpass: fix password parsing from console
Incorrect password if use backspace while entered the password.
Regression from
f7bfdbabf2d5398f4c266eabb0992a04af661f22
The '?:' operator has lower priority than the '-' operator
Dan Fandrich [Sun, 26 Jan 2014 09:52:27 +0000 (10:52 +0100)]
docs/INSTALL: Updated example minimal binary sizes
Marc Hoersken [Sun, 26 Jan 2014 09:00:14 +0000 (10:00 +0100)]
testsuite: visualize line-endings in output comparison diffs
Marc Hoersken [Sun, 26 Jan 2014 08:44:16 +0000 (09:44 +0100)]
sockfilt.c: follow up cleanup commit on
49b63cf3
Marc Hoersken [Sun, 26 Jan 2014 08:19:32 +0000 (09:19 +0100)]
http-pipe tests: use text as output data mode to support Windows
Marc Hoersken [Sat, 25 Jan 2014 23:58:30 +0000 (00:58 +0100)]
sockfilt.c: fixed and simplified Windows select function
Since the previous complex select function with initial support for
non-socket file descriptors, did not actually work correctly for
Console handles, this change simplifies the whole procedure by using
an internal waiting thread for the stdin console handle.
The previous implementation made it continuously trigger for the stdin
handle if it was being redirected to a parent process instead of
an actual Console input window.
This approach supports actual Console input handles as well as
anonymous Pipe handles which are used during input redirection.
It depends on the fact that ReadFile supports trying to read zero bytes
which makes it wait for the handle to become ready for reading.
Marc Hoersken [Sat, 25 Jan 2014 19:52:42 +0000 (20:52 +0100)]
http_pipe.py: replaced epoll with select to support Windows
Removed Unix-specific functionality in order to support Windows:
- select.epoll replaced with select.select
- SocketServer.ForkingMixIn replaced with SocketServer.ForkingMixIn
- socket.MSG_DONTWAIT replaced with socket.setblocking(False)
Even though epoll has a better performance and improved socket handling
than select, this change should not affect the actual test case.
Dan Fandrich [Sat, 25 Jan 2014 15:55:05 +0000 (16:55 +0100)]
tests: Added missing HTTP proxy keywords
Dan Fandrich [Sat, 25 Jan 2014 11:47:04 +0000 (12:47 +0100)]
tests: added missing <features> http to a number of tests
Dan Fandrich [Fri, 24 Jan 2014 22:29:35 +0000 (23:29 +0100)]
tests: Added a keyword for tests depending on internal info logs
Dan Fandrich [Fri, 24 Jan 2014 22:14:19 +0000 (23:14 +0100)]
runtests: Don't log command every torture iteration in verbose
Dan Fandrich [Fri, 24 Jan 2014 22:14:00 +0000 (23:14 +0100)]
tests: Added missing http feature to tests 509 & 1513
Dan Fandrich [Fri, 24 Jan 2014 20:52:48 +0000 (21:52 +0100)]
netrc: Fixed a memory and file descriptor leak on OOM