Stephan Bosch [Fri, 22 Nov 2013 20:12:08 +0000 (22:12 +0200)]
http: Implemented delayed requests scheduling.
Requests can now be (re)submitted with a delay. The request is not sent
until the delay time expires. This facilitates handling the Retry-After
header in responses. This can either be performed automatically if the
indicated delay is not too long or explicitly by the code using lib-http.
Stephan Bosch [Fri, 22 Nov 2013 20:08:20 +0000 (22:08 +0200)]
http-client: Improved handing of delayed request errors.
Originally each request would have its own zero timeout, but now only one
timeout is put in the host object.
Stephan Bosch [Fri, 22 Nov 2013 20:07:41 +0000 (22:07 +0200)]
http-client: Changed struct http_client_host_port into a struct http_client_queue object.
Peer and request objects now reference the queue object directly rather
than the host object. This way, there is no need to find the matching
host:port in the host anymore. This makes the queueing structure more
intuitive and more efficient. This is a first step towards support for
connecting to HTTP services through unix sockets or directing requests at
specific hosts (so not from the URL). This patch also fixes a potential
timeout leak (to_connect) in http_client_host_port (now http_client_queue)
and makes sure it is moved during switch_ioloop(). Finally it updates the
structure comment at the top of http-client.c.
Timo Sirainen [Fri, 22 Nov 2013 11:47:36 +0000 (13:47 +0200)]
ostream: Don't mark the stream closed too early after all.
Use another flag instead to avoid losing the last data written to the stream
before closing.
Timo Sirainen [Wed, 20 Nov 2013 12:50:53 +0000 (14:50 +0200)]
lib-storage: mail_get_*header*() still didn't handle cached values correctly.
If header ends with ":", the ":" shouldn't be returned as part of the value.
Timo Sirainen [Wed, 20 Nov 2013 12:37:44 +0000 (14:37 +0200)]
lib-storage: mail_get_*header*() didn't remove leading whitespace for headers from cache.
But it was removed when the headers were found by parsing the full header.
Timo Sirainen [Mon, 18 Nov 2013 14:18:53 +0000 (16:18 +0200)]
doveadm auth/user: Fixes to auth_socket_path handling.
doveadm user (without -u parameter) was ignoring "-a" parameter entirely.
Others weren't using auth_socket_path setting.
Timo Sirainen [Sun, 3 Nov 2013 21:27:15 +0000 (23:27 +0200)]
ostream: Mark stream closed before handling its callback to avoid infinite loops.
The callback could call o_stream_copy_error_from_parent(), which in turn
would try to close the same ostream again.
Timo Sirainen [Sat, 2 Nov 2013 20:30:42 +0000 (22:30 +0200)]
lib-imap: NIL as astring is the same as "NIL"
This is a bit klugdy but works as long as all callers use
imap_arg_get_astring() instead of trying to handle it themselves.
Timo Sirainen [Sat, 2 Nov 2013 19:29:39 +0000 (21:29 +0200)]
imap: Added initial support for METADATA extension.
For now this is enabled only when imap_metadata=yes setting is used. The
setting will go away once the feature is complete. Also mail_attribute_dict
must be set.
TODO:
- Metadata doesn't work for public namespaces. There should probably be a
mail_attribute_public_dict setting for that.
- There isn't any kind of quota or other limits
- After ENABLE METADATA start sending untagged METADATA entries to clients
- /shared/admin should probably return postmaster_address URL
- Check if we handle ACLs correctly
- RFC says that it SHOULD be possible to set METADATA entries to \NoSelect
mailboxes. We probably will never allow this though.
Timo Sirainen [Sat, 2 Nov 2013 13:27:28 +0000 (15:27 +0200)]
ssl-params: Added ssl_dh_parameters_length & removed ssl_parameters_regenerate setting.
ssl_parameters_regenerate was based on some text from GNUTLS documentation a
long time ago, but there's really not much point in doing it.
Ideally we should also support "openssl dhparam" input files, but for now
there's the ssl_dh_parameters_length setting that can be used to specify the
wanted DH parameters length. If the current ssl-parameters.dat has a
different length, it's regenerated.
We should probably at some point support also built-in DH parameters which
are returned while the ssl-params runs.
Timo Sirainen [Sat, 2 Nov 2013 12:19:23 +0000 (14:19 +0200)]
dsync: Don't track too new changes from transaction log.
This mattered only during race conditions while there were changes being
done to the mailbox during syncing.