On 31/10/2020 15:15, Scott Q. wrote:
But do you know how this bug was introduced ?
I checked the history of that file and don't see anything introduced recently that might cause this: https://github.com/dovecot/core/commits/master/src/lib-http/http-client-requ... <https://github.com/dovecot/core/commits/master/src/lib-http/http-client-request.c>
The only one that might be somewhat related is this one from Apr 27 by Stephan Bosch
https://github.com/dovecot/core/commit/799b52accf71e86756dde738d22c1c6a500a7... <https://github.com/dovecot/core/commit/799b52accf71e86756dde738d22c1c6a500a7e29#diff-1c02b3481573ffd33c9abccd3f5a6752a5cd81ca83389f4380657f7309c06366>
I don't know exactly. I'm guess it's not the above commit, since the problem is happening only when payload_finished is TRUE on arriving at the start of the http_client_request_send_more function and those lines set it to FALSE. Though I can't exclude it that it might be an indirect effect of this.
There are two places where http_client_request_send_more is called but the problematic call is the one that occurs in http-client-connection.c within the http_client_connection_continue_request function.
I wasn't able to identify a specific commit that introduced this problem. The http-client-connection.c file and the whole library has undergone numerous non trivial commits between 2.3.10 and 2.3.11.3 so the answer is not easy to identify by code inspectiion. With the various changes, the code now gets to http_client_request_send_more with payload_finished true but with payload_input NULL whereas in 2.3.10 payload_input was not NULL. (It's a logical deduction from the fact we didn't see the assert failures before and that part of the code has not changed).
John