Timo Sirainen [Thu, 30 Oct 2014 01:33:46 +0000 (18:33 -0700)]
imap-login: Added "x-session-ext-id" parameter for ID command.
It's exactly the same as "x-session-id", but this one can be safely used by
external software without having to worry about causing error messages in
older versions about too long session-id.
Stephan Bosch [Tue, 28 Oct 2014 23:12:09 +0000 (16:12 -0700)]
lib-http: client: Fixed assertion failure in http_client_queue_fail().
Don't explicitly clear the request array after looping through all
requests, since new requests may be added during the loop, not only
removed.
Timo Sirainen [Tue, 28 Oct 2014 04:43:10 +0000 (21:43 -0700)]
lib-http: If there's an error reading chunked http stream, set the error to the istream.
Previously the error string was set, but it was never read by anything.
Timo Sirainen [Mon, 27 Oct 2014 21:26:10 +0000 (23:26 +0200)]
lib: o_stream_uncork() could also cause write errors. Make sure last_failed_errno is updated.
This caused some write errors not to be detected, such as in code like:
o_stream_cork()
o_stream_nsend(..)
o_stream_uncork()
if (o_stream_nfinish() < 0) {
// error not detected because last_failed_errno was 0
}
Timo Sirainen [Mon, 27 Oct 2014 18:10:19 +0000 (20:10 +0200)]
master: Added an assert to catch duplicate fork() PIDs.
This really shouldn't be happening, but apparently it does sometimes. This
should make it easier to debug.
Stephan Bosch [Sun, 26 Oct 2014 16:43:57 +0000 (18:43 +0200)]
lib-http: server: Fixed a hang occurring sometimes when response is sent for a request that had payload.
Forgot to always trigger sending response when processing request payload
finishes.
Timo Sirainen [Sat, 25 Oct 2014 03:19:41 +0000 (06:19 +0300)]
lib-storage: LAYOUT=index now first creates the backend mailbox and only then adds it to list index.
This avoids any race conditions with mailbox creation and opening it.
Timo Sirainen [Fri, 24 Oct 2014 23:42:47 +0000 (02:42 +0300)]
auth: Some unsuccessful passdb lookups weren't returned as failures to passdb lookups.
These lookups were only being done internally, so it usually didn't matter.
Also this only affected things like allow_nets checking and some non-common
passdb { result_* } settings.
Stephan Bosch [Fri, 24 Oct 2014 22:38:42 +0000 (01:38 +0300)]
lib-http: client: Fixed cleanup of remaining waiting requests at connection destroy.
Forgot to dereference the requests for the reference that the connection
itself holds for each waiting request.
Timo Sirainen [Fri, 24 Oct 2014 00:58:35 +0000 (03:58 +0300)]
dsync: Removed in/out state from debugging.
This was initially added for debugging hangs, but those haven't existed for
a long time now. Maybe we should eventually make debug categories
configurable, but for now nobody wants to see these messages.
Timo Sirainen [Fri, 24 Oct 2014 00:54:21 +0000 (03:54 +0300)]
login proxy: If proxy_timeout is set, try to reconnect until the timeout is reached.
This allows quickly restarting/upgrading backend servers without returning
login failures.
Stephan Bosch [Thu, 23 Oct 2014 02:55:51 +0000 (05:55 +0300)]
lib-http: client: Implemented maximum for connection backoff time.
Without a maximum, the backoff time grows exponentially to enormous values,
because it isn't reset until the connection succeeds. This causes recovery
from connection failures to become very slow. Current maximum is one
minute.
Stephan Bosch [Thu, 23 Oct 2014 02:55:51 +0000 (05:55 +0300)]
lib-http: client: Assertion in http_client_queue_fail() was wrong.
It is not guaranteed that all queue lists are empty, because new requests
can be submitted from the callbacks. Changed this into a proper invariant
check, which asserts tbat the number of requests in sub-queues add up to
the total number in the main queue.
Stephan Bosch [Tue, 21 Oct 2014 20:34:50 +0000 (23:34 +0300)]
lib-http: client: If peer is unlinked from queue and no other links remain, close any pending connections.
Those pending connections would no longer serve any purpose.
Timo Sirainen [Tue, 21 Oct 2014 02:46:22 +0000 (05:46 +0300)]
lib-storage: LAYOUT=index no longer keeps list index locked while creating mailbox.
Mailbox opening can be slow and complicated and could even try to lock the
list index again. So it's a bit more racy now, but all mailbox formats can
already handle races with mailbox creation.
Stephan Bosch [Mon, 20 Oct 2014 15:54:27 +0000 (08:54 -0700)]
lib-http: client: Fixed behavior of connection backoff timer when multiple IPs are returned for hostname.
Peer backoff data was lost because peer was destroyed quickly. Now the peer
object is retained during the backoff period, so that new connection
attempts adhere to the backoff period.
Stephan Bosch [Mon, 20 Oct 2014 15:54:26 +0000 (08:54 -0700)]
lib-http: client: Fixed handling of connection timeouts.
A timeout caused an assert failure, because the connection status was
altered before the peer_connection_failure handler was called.
Timo Sirainen [Fri, 17 Oct 2014 22:55:02 +0000 (01:55 +0300)]
lib-storage: If we detect a broken cached message size, log more information about it.
Also try to include one of the cached headers in the message, which could
allow detecting if the cached data pointed to a completely different
message.
Timo Sirainen [Thu, 16 Oct 2014 15:19:03 +0000 (08:19 -0700)]
lib-storage: LAYOUT=index doesn't reserve '~' as internal separator anymore.
The index doesn't reserve any character as hierarchy separator, so the
internal separator can change at any time. Use the namespace's configured
hierarchy separator as the internal separator to avoid reserving any
characters. If namespace separator isn't configured, fallback to the
original '~' so this change shouldn't break anything.
Timo Sirainen [Wed, 15 Oct 2014 14:37:05 +0000 (07:37 -0700)]
doveconf: Allow settings plugins to print comments to the output header.
If plugin contains <plugin name>_doveconf_comment string, it's written as
part of the doveconf output. The idea mainly being that the major plugins
(such as Pigeonhole) could print their version number there to avoid having
to ask for it separately.