]> git.ipfire.org Git - thirdparty/dovecot/core.git/log
thirdparty/dovecot/core.git
5 years agolib-ntlm: Check buffer length on responses
Aki Tuomi [Mon, 18 May 2020 09:33:39 +0000 (12:33 +0300)] 
lib-ntlm: Check buffer length on responses

Add missing check for buffer length.

If this is not checked, it is possible to send message which
causes read past buffer bug.

Broken in c7480644202e5451fbed448508ea29a25cffc99c

5 years agoauth: mech-rpa - Fail on zero len buffer
Aki Tuomi [Wed, 6 May 2020 10:40:36 +0000 (13:40 +0300)] 
auth: mech-rpa - Fail on zero len buffer

5 years agopop3: Use separate search queries for expunging and setting \Seen flags
Timo Sirainen [Mon, 11 May 2020 16:00:25 +0000 (19:00 +0300)] 
pop3: Use separate search queries for expunging and setting \Seen flags

Using a single shared search query causes mail prefetching to behave
inefficiently. Especially lazy_expunge plugin could have done refcount
prefetch for non-deleted mails as well.

5 years agopop3: Split off pop3_search_build_seqset()
Timo Sirainen [Mon, 11 May 2020 16:00:04 +0000 (19:00 +0300)] 
pop3: Split off pop3_search_build_seqset()

5 years agopop3: Minor optimization to unexpected client disconnections
Timo Sirainen [Mon, 11 May 2020 15:50:18 +0000 (18:50 +0300)] 
pop3: Minor optimization to unexpected client disconnections

There's no need to build deleted messages seqset if it's not used.

5 years agodict: When client is disconnected, make sure its input IO is removed
Timo Sirainen [Thu, 14 May 2020 19:55:05 +0000 (22:55 +0300)] 
dict: When client is disconnected, make sure its input IO is removed

Just in case it takes a while to fully unreference the client, make sure its
input callback won't be called rapidly.

5 years agodict: Fix deinitializing dict iteration if client disconnects
Timo Sirainen [Thu, 14 May 2020 19:52:34 +0000 (22:52 +0300)] 
dict: Fix deinitializing dict iteration if client disconnects

If the client's ostream was full at the disconnection time, the iteration
wasn't aborted. Instead, the connection was kept forever and its input
callback was kept being called rapidly, causing 100% CPU usage.

5 years agodict: Split off cmd_iterate_flush_finish()
Timo Sirainen [Thu, 14 May 2020 19:52:08 +0000 (22:52 +0300)] 
dict: Split off cmd_iterate_flush_finish()

5 years agolmtp: lmtp-commands - Explicity prohibit empty RCPT path.
Stephan Bosch [Fri, 20 Mar 2020 12:38:41 +0000 (13:38 +0100)] 
lmtp: lmtp-commands - Explicity prohibit empty RCPT path.

The empty path <""> will yield an empty username.

5 years agolib-smtp: smtp-address - Only produce a <> address in smtp_address_clone() when that...
Stephan Bosch [Fri, 20 Mar 2020 12:37:04 +0000 (13:37 +0100)] 
lib-smtp: smtp-address - Only produce a <> address in smtp_address_clone() when that is the input.

It also produced an effective null address when the localpart was empty.

5 years agolib-smtp: smtp-address - Don't recognize an address with empty localpart as <>.
Stephan Bosch [Fri, 20 Mar 2020 12:35:19 +0000 (13:35 +0100)] 
lib-smtp: smtp-address - Don't recognize an address with empty localpart as <>.

Depending on context, the addresses <""@domain.tld> and <""> are potentially
valid non-null addresses.

5 years agolib-smtp: smtp-address - Don't return NULL from smtp_address_clone*() unless the...
Stephan Bosch [Sun, 22 Mar 2020 17:14:44 +0000 (18:14 +0100)] 
lib-smtp: smtp-address - Don't return NULL from smtp_address_clone*() unless the input is NULL.

5 years agolib-smtp: test-smtp-server-errors - Add tests for large series of empty and bad commands.
Stephan Bosch [Tue, 24 Mar 2020 11:59:15 +0000 (12:59 +0100)] 
lib-smtp: test-smtp-server-errors - Add tests for large series of empty and bad commands.

5 years agolib-smtp: smtp-server-connection - Hold a command reference while executing a command.
Stephan Bosch [Tue, 24 Mar 2020 11:25:03 +0000 (12:25 +0100)] 
lib-smtp: smtp-server-connection - Hold a command reference while executing a command.

This fixes a use-after-free problem at the end of
smtp_server_connection_handle_command().

5 years agolib-smtp: smtp-server-command - Perform initial command execution in separate function.
Stephan Bosch [Tue, 24 Mar 2020 11:23:32 +0000 (12:23 +0100)] 
lib-smtp: smtp-server-command - Perform initial command execution in separate function.

5 years agolib-smtp: smtp-server-command - Guarantee that non-destroy hooks aren't called for...
Stephan Bosch [Tue, 24 Mar 2020 11:13:43 +0000 (12:13 +0100)] 
lib-smtp: smtp-server-command - Guarantee that non-destroy hooks aren't called for an ended command.

5 years agolib-smtp: test-smtp-server-errors - Add tests for VRFY and NOOP commands with invalid...
Stephan Bosch [Tue, 24 Mar 2020 21:33:45 +0000 (22:33 +0100)] 
lib-smtp: test-smtp-server-errors - Add tests for VRFY and NOOP commands with invalid parameters.

5 years agolib-smtp: Add tests for smtp_string_parse() and smtp_string_write().
Stephan Bosch [Tue, 24 Mar 2020 21:24:20 +0000 (22:24 +0100)] 
lib-smtp: Add tests for smtp_string_parse() and smtp_string_write().

5 years agolib-smtp: smtp-syntax - Return 0 for smtp_string_parse() with empty input.
Stephan Bosch [Tue, 24 Mar 2020 21:42:15 +0000 (22:42 +0100)] 
lib-smtp: smtp-syntax - Return 0 for smtp_string_parse() with empty input.

This is what the current users of this function actually expect.

5 years agolib-smtp: smtp-syntax - Do not allow NULL return parameters for smtp_ehlo_line_parse().
Stephan Bosch [Tue, 24 Mar 2020 20:14:34 +0000 (21:14 +0100)] 
lib-smtp: smtp-syntax - Do not allow NULL return parameters for smtp_ehlo_line_parse().

5 years agolib-smtp: smtp-syntax - Do not allow NULL return parameters for smtp_xtext_parse().
Stephan Bosch [Tue, 24 Mar 2020 20:11:01 +0000 (21:11 +0100)] 
lib-smtp: smtp-syntax - Do not allow NULL return parameters for smtp_xtext_parse().

5 years agolib-smtp: smtp-syntax - Do not allow NULL return parameters for smtp_string_parse().
Stephan Bosch [Tue, 24 Mar 2020 19:57:03 +0000 (20:57 +0100)] 
lib-smtp: smtp-syntax - Do not allow NULL return parameters for smtp_string_parse().

5 years agolib-smtp: smtp-server-cmd-vrfy - Restructure parameter parsing.
Stephan Bosch [Tue, 24 Mar 2020 20:05:17 +0000 (21:05 +0100)] 
lib-smtp: smtp-server-cmd-vrfy - Restructure parameter parsing.

5 years agolib-smtp: Reformat smtp-server-cmd-vrfy.c.
Stephan Bosch [Tue, 24 Mar 2020 20:00:19 +0000 (21:00 +0100)] 
lib-smtp: Reformat smtp-server-cmd-vrfy.c.

5 years agolib-smtp: Reformat smtp-server-cmd-noop.c.
Stephan Bosch [Tue, 24 Mar 2020 20:08:37 +0000 (21:08 +0100)] 
lib-smtp: Reformat smtp-server-cmd-noop.c.

5 years agolib-smtp: Reformat smtp-syntax.c.
Stephan Bosch [Tue, 24 Mar 2020 19:51:24 +0000 (20:51 +0100)] 
lib-smtp: Reformat smtp-syntax.c.

5 years agolib-smtp: Reformat smtp-syntax.h.
Stephan Bosch [Tue, 24 Mar 2020 19:45:21 +0000 (20:45 +0100)] 
lib-smtp: Reformat smtp-syntax.h.

5 years agoauth: test-mech - Remove auth-token-secret.dat after test suite
Aki Tuomi [Wed, 13 May 2020 07:52:50 +0000 (10:52 +0300)] 
auth: test-mech - Remove auth-token-secret.dat after test suite

5 years agoauth: mech-digest-md5 - Do not read past buffer on right trim
Aki Tuomi [Tue, 12 May 2020 06:48:06 +0000 (09:48 +0300)] 
auth: mech-digest-md5 - Do not read past buffer on right trim

If the string does not have comma at the end, do not progress
the pointer past buffer end.

5 years agoauth: test-mech - Fix memory leaks
Aki Tuomi [Tue, 12 May 2020 06:22:20 +0000 (09:22 +0300)] 
auth: test-mech - Fix memory leaks

Forgotten in f6bb82a222e7973e9f9b7056dfe015fe3d8632f7

5 years agolib-index: Index rebuilding lost fields in cache
Timo Sirainen [Mon, 11 May 2020 14:25:41 +0000 (17:25 +0300)] 
lib-index: Index rebuilding lost fields in cache

Regression caused by 5f6d2134690e4b84d38d556e3086668e32f30b50

5 years agolib-index: Fix setting initial last_used for fields in mail_[always_]cache_fields
Timo Sirainen [Mon, 11 May 2020 14:23:19 +0000 (17:23 +0300)] 
lib-index: Fix setting initial last_used for fields in mail_[always_]cache_fields

These fields had last_used=0 until the field was accessed. If cache was
purged before this access, the field was dropped. Fixed by assuming
(last_used=0, decision!=NO) is still the first time the field is being
used. This also causes it to trigger mail_cache_decision_changed event.

5 years agolib-index: mail_cache_decision_add() - Add priv helper variable
Timo Sirainen [Tue, 12 May 2020 08:23:23 +0000 (11:23 +0300)] 
lib-index: mail_cache_decision_add() - Add priv helper variable

5 years agolib-index: Make mail_cache_decision_to_string() public
Timo Sirainen [Tue, 12 May 2020 08:20:57 +0000 (11:20 +0300)] 
lib-index: Make mail_cache_decision_to_string() public

5 years agoauth: auth_request_finished event - policy_result=delayed didn't work
Timo Sirainen [Fri, 24 Apr 2020 14:17:46 +0000 (17:17 +0300)] 
auth: auth_request_finished event - policy_result=delayed didn't work

It was returned as "ok" instead of "delayed".

5 years agolib-http: test-http-client-errors: "reply payload" test - Make server announce that...
Stephan Bosch [Fri, 8 May 2020 14:18:29 +0000 (16:18 +0200)] 
lib-http: test-http-client-errors: "reply payload" test - Make server announce that connection is closed.

This prevents race condition between connection closure and client trying to reuse the connection.

5 years agolib-http: test-http-client-errors: "reply payload" test - Fix name of server context...
Stephan Bosch [Fri, 8 May 2020 14:22:48 +0000 (16:22 +0200)] 
lib-http: test-http-client-errors: "reply payload" test - Fix name of server context struct.

5 years agoauth: test-mech - Rewrote test
Aki Tuomi [Thu, 7 May 2020 10:57:14 +0000 (13:57 +0300)] 
auth: test-mech - Rewrote test

5 years agoauth: test-mock - Add credentials lookup support
Aki Tuomi [Fri, 8 May 2020 10:12:39 +0000 (13:12 +0300)] 
auth: test-mock - Add credentials lookup support

5 years agoauth: test - Export passdb mock settings
Aki Tuomi [Fri, 8 May 2020 10:08:19 +0000 (13:08 +0300)] 
auth: test - Export passdb mock settings

5 years agoauth: Move auth_request_fail_on_nuls to auth-request.c
Aki Tuomi [Thu, 7 May 2020 11:15:14 +0000 (14:15 +0300)] 
auth: Move auth_request_fail_on_nuls to auth-request.c

Where is belongs to

5 years agolib-sasl: dsasl-client - Check for NULs in server response
Aki Tuomi [Wed, 6 May 2020 10:47:36 +0000 (13:47 +0300)] 
lib-sasl: dsasl-client - Check for NULs in server response

If server response unexpectedly contains embedded NULs, fail
authentication.

5 years agoauth: mech - Remove redundant NUL checks
Aki Tuomi [Wed, 6 May 2020 10:12:33 +0000 (13:12 +0300)] 
auth: mech - Remove redundant NUL checks

Partially reverts ce7a61301cb233647c447dd917d5df1184d02317

The check is moved to higher up in call chain.

5 years agoauth: mech - Add MECH_SEC_ALLOW_NULS flag
Aki Tuomi [Wed, 6 May 2020 10:07:01 +0000 (13:07 +0300)] 
auth: mech - Add MECH_SEC_ALLOW_NULS flag

Prevent embedded NULs for any mechs that do not have this flag

5 years agoauth: test-mech - Use auth_request_initial/continue testing
Aki Tuomi [Thu, 7 May 2020 08:09:00 +0000 (11:09 +0300)] 
auth: test-mech - Use auth_request_initial/continue testing

This way the embedded nul checks actually get executed.

5 years agoauth: oauth2 - Set username after parsing
Aki Tuomi [Fri, 8 May 2020 10:08:42 +0000 (13:08 +0300)] 
auth: oauth2 - Set username after parsing

Otherwise we might mistakenly set username despite the
token being malformed.

5 years agolib-fs: Don't hide errors when iteration calls fs_set_error() multiple times
Timo Sirainen [Thu, 16 Apr 2020 17:17:11 +0000 (20:17 +0300)] 
lib-fs: Don't hide errors when iteration calls fs_set_error() multiple times

The last error is returned by fs_iter_deinit(). The other errors are
logged directly.

5 years agolib-http: http-server-response - Fix dead assignment in http_server_response_send_real().
Stephan Bosch [Wed, 6 May 2020 00:04:31 +0000 (02:04 +0200)] 
lib-http: http-server-response - Fix dead assignment in http_server_response_send_real().

Found by Clang scan-build.

5 years agolib-http: test-http-client-errors: Emit error for unexpected request payload in ...
Stephan Bosch [Wed, 6 May 2020 00:00:48 +0000 (02:00 +0200)] 
lib-http: test-http-client-errors: Emit error for unexpected request payload in "retry payload" test.

5 years agolib-http: test-http-client-errors - Correct response payload length in "retry payload...
Stephan Bosch [Tue, 5 May 2020 23:53:39 +0000 (01:53 +0200)] 
lib-http: test-http-client-errors - Correct response payload length in "retry payload" test.

5 years agolib-http: test-http-client-errors - Emit an error message for bad responses.
Stephan Bosch [Tue, 5 May 2020 23:52:12 +0000 (01:52 +0200)] 
lib-http: test-http-client-errors - Emit an error message for bad responses.

Makes debugging issues with this unit test easier.

5 years agoauth: Remove the check for NULs in mech-rpa
Markus Valentin [Wed, 6 May 2020 08:34:26 +0000 (10:34 +0200)] 
auth: Remove the check for NULs in mech-rpa

It was wrongly added for rpa, as it's a binary protocol.

5 years agolib-http: test-http-payload - Increase client progress timeout to 30 s.
Stephan Bosch [Mon, 4 May 2020 12:51:29 +0000 (14:51 +0200)] 
lib-http: test-http-payload - Increase client progress timeout to 30 s.

This makes the SSL test a little less brittle.

5 years agolib-http: http-server-ostream - Remove dangerous assertions in http_server_ostream_wa...
Stephan Bosch [Wed, 29 Apr 2020 20:23:44 +0000 (22:23 +0200)] 
lib-http: http-server-ostream - Remove dangerous assertions in http_server_ostream_wait_begin().

5 years agolib-http: http-server-connection - Fix result of http_server_connection_next_response().
Stephan Bosch [Wed, 29 Apr 2020 15:45:21 +0000 (17:45 +0200)] 
lib-http: http-server-connection - Fix result of http_server_connection_next_response().

Return _OUTPUT_BLOCKED only when the output fd is blocked.

5 years agolib-http: http-client-connection - Avoid calling http_client_request_send_more()...
Stephan Bosch [Wed, 29 Apr 2020 15:45:06 +0000 (17:45 +0200)] 
lib-http: http-client-connection - Avoid calling http_client_request_send_more() directly.

Get it called from http_client_connection_output() later.

5 years agolib-http: test-http-client-errors - Make "retry payload" test more reliable.
Stephan Bosch [Tue, 28 Apr 2020 21:59:39 +0000 (23:59 +0200)] 
lib-http: test-http-client-errors - Make "retry payload" test more reliable.

5 years agolib-http: http-client-request - Fix return value of http_client_request_send*().
Stephan Bosch [Tue, 28 Apr 2020 17:28:58 +0000 (19:28 +0200)] 
lib-http: http-client-request - Fix return value of http_client_request_send*().

Make sure 1 is returned when all that can be sent is sent. It must not return 0
when the payload input stream is blocking.

5 years agolib-http: http-server-response - Fix return value of http_server_response_send*().
Stephan Bosch [Tue, 28 Apr 2020 17:28:48 +0000 (19:28 +0200)] 
lib-http: http-server-response - Fix return value of http_server_response_send*().

Make sure 1 is returned when all that can be sent is sent. It must not return 0
when the payload input stream is blocking or when the payload output stream
buffer has no data to be sent.

5 years agolib: ostream-wrapper - Return flush status from o_stream_wrapper_continue().
Stephan Bosch [Wed, 29 Apr 2020 07:51:55 +0000 (09:51 +0200)] 
lib: ostream-wrapper - Return flush status from o_stream_wrapper_continue().

5 years agolib: connection_input_resume() - Set added IO as having pending input
Timo Sirainen [Thu, 31 Oct 2019 13:56:58 +0000 (15:56 +0200)] 
lib: connection_input_resume() - Set added IO as having pending input

This makes sense, because when the connection is halted it might already
have input pending in the istream. So doing this always automatically
can prevent unexpected hangs. It shouldn't be harmful to do this even if
there's no input pending.

5 years agolmtp: Don't add "detail" field to events if it's empty
Timo Sirainen [Mon, 27 Apr 2020 11:42:59 +0000 (14:42 +0300)] 
lmtp: Don't add "detail" field to events if it's empty

5 years agolda: Add protocol=lda to the root lda event
Timo Sirainen [Mon, 27 Apr 2020 10:29:19 +0000 (13:29 +0300)] 
lda: Add protocol=lda to the root lda event

5 years agolib-smtp: Fix adding "protocol" field to smtp_server_* events
Timo Sirainen [Sun, 26 Apr 2020 18:42:51 +0000 (21:42 +0300)] 
lib-smtp: Fix adding "protocol" field to smtp_server_* events

The server connection always had its own parent event instead of using
smtp_server.event.

5 years agolib-lda: mail-deliver - Add "error" field to the mail_delivery_finished event.
Stephan Bosch [Wed, 15 Apr 2020 19:08:23 +0000 (21:08 +0200)] 
lib-lda: mail-deliver - Add "error" field to the mail_delivery_finished event.

5 years agolib-lda: mail-deliver - Add MAIL_DELIVER_ERROR_REJECTED.
Stephan Bosch [Wed, 15 Apr 2020 22:04:02 +0000 (00:04 +0200)] 
lib-lda: mail-deliver - Add MAIL_DELIVER_ERROR_REJECTED.

This is not used yet, but useful for future expansion.

5 years agolib-lda: mail-deliver - Move common part of the error handling to mail_deliver()...
Stephan Bosch [Wed, 15 Apr 2020 18:43:13 +0000 (20:43 +0200)] 
lib-lda: mail-deliver - Move common part of the error handling to mail_deliver() itself.

Before, much of that was handled by the respective callers (LDA and LMTP).

5 years agolda: main - Rename error variables in lda_do_deliver().
Stephan Bosch [Wed, 15 Apr 2020 19:01:39 +0000 (21:01 +0200)] 
lda: main - Rename error variables in lda_do_deliver().

5 years agolmtp: lmtp-local - Perform actual (default) delivery in a separate function.
Stephan Bosch [Wed, 15 Apr 2020 18:47:11 +0000 (20:47 +0200)] 
lmtp: lmtp-local - Perform actual (default) delivery in a separate function.

5 years agolib-lda: mail-deliver - Properly parse Message-ID header.
Stephan Bosch [Mon, 27 Apr 2020 22:15:00 +0000 (00:15 +0200)] 
lib-lda: mail-deliver - Properly parse Message-ID header.

5 years agolib-storage: mail - Add mail_get_message_id().
Stephan Bosch [Tue, 18 Feb 2020 22:30:29 +0000 (23:30 +0100)] 
lib-storage: mail - Add mail_get_message_id().

It is a convenience function that reads and parses the Message-ID.

5 years agolib-ssl-iostream: Indicate that password might be wrong when decrypting key
Aki Tuomi [Mon, 20 Apr 2020 19:59:14 +0000 (22:59 +0300)] 
lib-ssl-iostream: Indicate that password might be wrong when decrypting key

5 years agolib-ssl-iostream: Copy key password correctly
Aki Tuomi [Mon, 20 Apr 2020 08:11:28 +0000 (11:11 +0300)] 
lib-ssl-iostream: Copy key password correctly

OpenSSL failed to decrypt key because the password context
was copied instead of the password.

Broken in e98de01b564

5 years agoauth: policy - Fix crash with auth_policy_check_after_auth=no and delay_until
Timo Sirainen [Sat, 25 Apr 2020 09:30:50 +0000 (12:30 +0300)] 
auth: policy - Fix crash with auth_policy_check_after_auth=no and delay_until

The auth policy lookup context must not be allocated from stack, because it
is used in a timeout created by delay_until.

Fixes:
Panic: file auth-request.c: line 292 (auth_request_success_continue): assertion failed: (request->state == AUTH_REQUEST_STATE_MECH_CONTINUE)

5 years agodoveadm: Cork the print ostream immediately after creating
Timo Sirainen [Tue, 14 Apr 2020 13:56:15 +0000 (16:56 +0300)] 
doveadm: Cork the print ostream immediately after creating

This avoids making many tiny write()s to stdout.

5 years agostats: Rename 'name' to 'metric_name' in metric { } blocks
Josef 'Jeff' Sipek [Tue, 21 Apr 2020 17:26:06 +0000 (13:26 -0400)] 
stats: Rename 'name' to 'metric_name' in metric { } blocks

There was a decent amount of confusion about what what the 'name' setting
meant.  In short,

metric foo {
...
}

was equivalent to:

metric {
name = foo
...
}

Unfortunately, this was often misunderstood as "the name of the *event* we
are interested in".  To avoid this confusion, we rename the setting to
'metric_name'.  So, from now on, if you want to specify the name inside the
metric block (instead of before the '{'), you must use:

metric {
metric_name = fo
...
}

5 years agolib-master: master_service_ssl_settings_get() - assert that SSL settings actually...
Timo Sirainen [Wed, 20 Feb 2019 12:04:04 +0000 (14:04 +0200)] 
lib-master: master_service_ssl_settings_get() - assert that SSL settings actually exist

5 years agolib-http: test-http-client-errors - Add tests for retrying requests with payload.
Stephan Bosch [Fri, 24 Apr 2020 22:25:40 +0000 (00:25 +0200)] 
lib-http: test-http-client-errors - Add tests for retrying requests with payload.

5 years agolib-http: test-http-client-errors - Add support for server connection init/deinit...
Stephan Bosch [Fri, 24 Apr 2020 22:25:07 +0000 (00:25 +0200)] 
lib-http: test-http-client-errors - Add support for server connection init/deinit functions.

5 years agolib-http: test-http-payload - Add support for testing with small TCP socket buffers.
Stephan Bosch [Thu, 23 Apr 2020 11:08:08 +0000 (13:08 +0200)] 
lib-http: test-http-payload - Add support for testing with small TCP socket buffers.

5 years agolib-http: test-http-payload - Initialize common client and server settings at one...
Stephan Bosch [Thu, 23 Apr 2020 11:03:37 +0000 (13:03 +0200)] 
lib-http: test-http-payload - Initialize common client and server settings at one place.

5 years agolib-http: http-server-connection - Return 0 from flush callback when there is more...
Stephan Bosch [Thu, 23 Apr 2020 21:41:49 +0000 (23:41 +0200)] 
lib-http: http-server-connection - Return 0 from flush callback when there is more payload to be sent.

5 years agolib-http: http-server-response - Make return value of http_server_response_send*...
Stephan Bosch [Fri, 24 Apr 2020 20:36:15 +0000 (22:36 +0200)] 
lib-http: http-server-response - Make return value of http_server_response_send*() indicate whether all is sent.

5 years agolib-http: http-server-ostream - Handle finished request as a separate event.
Stephan Bosch [Thu, 23 Apr 2020 13:21:06 +0000 (15:21 +0200)] 
lib-http: http-server-ostream - Handle finished request as a separate event.

While waiting in the flush ioloop, the request will not be destroyed, in which
case the ioloop will potentially never end. This is fixed by notifying the
wrapper output stream about the parent output stream going away, which
interrupts the ioloop in the process.

5 years agolib-http: http-server-ostream - Make sure request payload input stream is destroyed...
Stephan Bosch [Thu, 23 Apr 2020 13:18:53 +0000 (15:18 +0200)] 
lib-http: http-server-ostream - Make sure request payload input stream is destroyed before blocking.

5 years agolib-http: http-server-response - Fix sending payload input streams that are seeked...
Stephan Bosch [Thu, 31 May 2018 18:56:53 +0000 (20:56 +0200)] 
lib-http: http-server-response - Fix sending payload input streams that are seeked beyond 0.

5 years agolib-http: http-client-request - Properly reset payload state upon retry/redirect.
Stephan Bosch [Fri, 24 Apr 2020 21:12:51 +0000 (23:12 +0200)] 
lib-http: http-client-request - Properly reset payload state upon retry/redirect.

5 years agolib-http: http-client-request - Put shared code from http_client_request_resubmit...
Stephan Bosch [Fri, 24 Apr 2020 21:02:28 +0000 (23:02 +0200)] 
lib-http: http-client-request - Put shared code from http_client_request_resubmit/redirect() in new function.

5 years agolib-http: http-client-connection - Return 0 from flush callback when there is more...
Stephan Bosch [Fri, 24 Apr 2020 23:32:11 +0000 (01:32 +0200)] 
lib-http: http-client-connection - Return 0 from flush callback when there is more payload to be sent.

5 years agolib-http: http-client-connection - Set output flush pending when http_client_request_...
Stephan Bosch [Sat, 25 Apr 2020 15:55:56 +0000 (17:55 +0200)] 
lib-http: http-client-connection - Set output flush pending when http_client_request_send() returns 0.

5 years agolib-http: http-client-request - Make return value of http_client_request_send*()...
Stephan Bosch [Fri, 24 Apr 2020 23:31:14 +0000 (01:31 +0200)] 
lib-http: http-client-request - Make return value of http_client_request_send*() indicate whether all is sent.

5 years agolib-http: http-client-connection - Remove useless cork/uncork from http_client_connec...
Stephan Bosch [Sat, 25 Apr 2020 15:43:11 +0000 (17:43 +0200)] 
lib-http: http-client-connection - Remove useless cork/uncork from http_client_connection_continue_request().

5 years agolib-http: http-client-connection - Fix race condition between finishing output stream...
Stephan Bosch [Fri, 24 Apr 2020 20:26:26 +0000 (22:26 +0200)] 
lib-http: http-client-connection - Fix race condition between finishing output stream and response.

5 years agolib-http: http-client-request - Fix sending payload input streams that are seeked...
Stephan Bosch [Thu, 31 May 2018 18:57:41 +0000 (20:57 +0200)] 
lib-http: http-client-request - Fix sending payload input streams that are seeked beyond 0.

5 years agolib: ostream-wrapper - Allow parent output being closed in wrapper_ostream_continue().
Stephan Bosch [Thu, 23 Apr 2020 13:16:03 +0000 (15:16 +0200)] 
lib: ostream-wrapper - Allow parent output being closed in wrapper_ostream_continue().

This happens when wrapper_ostream_output_destroyed() is called while waiting in
flush wait loop.

5 years agolib: ostream-wrapper - Properly manage parent output events for blocking operation.
Stephan Bosch [Thu, 23 Apr 2020 09:36:30 +0000 (11:36 +0200)] 
lib: ostream-wrapper - Properly manage parent output events for blocking operation.

The problem was exposed by a panic occurring in src/lib-http/test-http-payload unit test:

Panic: file ostream-wrapper.c: line 291 (wrapper_ostream_flush_wait): assertion failed: (io_loop_have_ios(ioloop) || io_loop_have_immediate_timeouts(ioloop))

5 years agolib-http: Reformat test-http-client-errors.c.
Stephan Bosch [Mon, 6 Apr 2020 21:26:36 +0000 (23:26 +0200)] 
lib-http: Reformat test-http-client-errors.c.

5 years agolib-http: Reformat test-http-payload.c.
Stephan Bosch [Wed, 4 Apr 2018 11:27:53 +0000 (13:27 +0200)] 
lib-http: Reformat test-http-payload.c.

5 years agolib-http: Reformat http-client-request.c.
Stephan Bosch [Tue, 20 Mar 2018 19:59:32 +0000 (20:59 +0100)] 
lib-http: Reformat http-client-request.c.

5 years agolib-ssl-iostream: Add missing set name to ssl_proxy_ctx_get_pkey_ec_curve_name
Aki Tuomi [Mon, 27 Apr 2020 05:08:06 +0000 (08:08 +0300)] 
lib-ssl-iostream: Add missing set name to ssl_proxy_ctx_get_pkey_ec_curve_name

It was forgotten in 934a5e7cdb3105a07e2b1dec5916f4abfb3ee2a1