Stephan Bosch [Sun, 15 Sep 2013 22:02:03 +0000 (01:02 +0300)]
lib-http: http-client: Fixed segfault caused by earlier improvement of connection output locking.
Segfault was triggered when an aborted request received a response.
Stephan Bosch [Sun, 15 Sep 2013 00:56:25 +0000 (03:56 +0300)]
lib-http: Added support for handling HTTP/1.0 messages explicitly.
This means that default connection persistence semantics are inverted for
HTTP/1.0 and keep-alive Connection option is recognized.
Stephan Bosch [Sun, 15 Sep 2013 00:55:11 +0000 (03:55 +0300)]
lib-http: http-request-parser: Added function to test whether payload from previous request is still being parsed.
This is needed in the server implementation to check whether a request is
completely read.
Stephan Bosch [Sun, 15 Sep 2013 00:44:42 +0000 (03:44 +0300)]
lib-http: Unified http-request.h and http-response.h headers.
Renamed struct http_response_header to struct http_header_field,
encapsulated the array in struct http_header and put it all in
http-header.h/c Added inline utility functions for header querying and
getting response/request payload size.
Stephan Bosch [Sun, 15 Sep 2013 00:39:45 +0000 (03:39 +0300)]
lib-http: Improved message header and body parsing for better RFC compliance.
Added pre-parsed transfer-encoding and connection header content (array) to
parsed message struct. Fixed message body handling for when both
transfer-encoding and content-length headers are missing. Now duplicates of
unique important message headers yield an error.
Stephan Bosch [Sun, 15 Sep 2013 00:35:04 +0000 (03:35 +0300)]
lib-http: Added support for asynchronous payload for requests.
This means that the payload stream passed to the request can be a
non-blocking socket stream from some other connection (e.g. proxy client
connection).
Stephan Bosch [Sun, 15 Sep 2013 00:33:44 +0000 (03:33 +0300)]
lib-http: http-client: Requests now automatically generate a Date header.
The used date value is normally the submission time of the request, but it
can be set explicitly.
Stephan Bosch [Sun, 15 Sep 2013 00:29:03 +0000 (03:29 +0300)]
lib-http: http-client: Fixed leak of ostream when request was resubmitted upon 417 response regarding 100-continue.
This would only occur when the server refuses Expect: 100-continue with a
417 response. The payload_output stream would be overwritten without being
freed first.
Stephan Bosch [Sun, 15 Sep 2013 00:27:31 +0000 (03:27 +0300)]
lib-http: http-client: Fixed pipelining when payload synchronizatio (100-continue) is used.
Forgot to lock the connection output, which meant that new requests would
enqueued for the connection while waiting for 100 Continue. This would
cause an assert failure.
Timo Sirainen [Tue, 27 Aug 2013 01:06:43 +0000 (04:06 +0300)]
dbox: When fixing a broken file, try harder to find only valid message/metadata positions.
The previous method sometime broke with compressed mail content, because the
magic blocks were so short.
Timo Sirainen [Wed, 21 Aug 2013 17:03:13 +0000 (20:03 +0300)]
lib-storage: When doing a fast sync, refresh index to see if it had any changes.
I'm pretty sure this used to be done earlier, but probably some
optimizations dropped it at some point.
Timo Sirainen [Tue, 13 Aug 2013 17:57:41 +0000 (20:57 +0300)]
lib-lda: Don't alow %variables for hostname setting after all.
I was thinking maybe %d could be used there, but with LMTP the hostname is
used already in the greeting message before any RCPT TO is even done.
Timo Sirainen [Mon, 12 Aug 2013 16:02:07 +0000 (19:02 +0300)]
auth: Added %{domain_first} and %{domain_last} variables.
They are both equal to %d normally, but differ when there are multiple '@'
characters in the domain.
Timo Sirainen [Tue, 6 Aug 2013 11:53:23 +0000 (14:53 +0300)]
net_ip2addr() changed to return "" instead of NULL on failure.
Pretty much everything in the code assumed that it would never fail, which
it normally doesn't except if the ip_addr was created for UNIX sockets.
Timo Sirainen [Mon, 5 Aug 2013 19:16:02 +0000 (22:16 +0300)]
lib-storage: Use a separate auth-userdb connection for iterating through users.
This is required because the auth-userdb connection is also wanted in the
middle of the iteration to do USER lookups.