if (req->req.payload != NULL) {
/* Send 100 Continue when appropriate */
if (req->req.expect_100_continue && !req->payload_halted &&
- req->response == NULL) {
+ (req->response == NULL || !req->response->submitted)) {
http_server_connection_output_trigger(conn);
}
/* send 100 Continue if appropriate */
if (req->state >= HTTP_SERVER_REQUEST_STATE_QUEUED &&
conn->incoming_payload != NULL &&
- req->response == NULL && req->req.version_minor >= 1 &&
+ (req->response == NULL || !req->response->submitted) &&
+ req->req.version_minor >= 1 &&
req->req.expect_100_continue && !req->payload_halted &&
!req->sent_100_continue) {
static const char *response =
size_t read_server_partial;
bool server_cork;
bool server_trickle_final_byte;
+ bool preset_header;
bool ssl;
} tset;
creq = client_request_init(client, req);
+ if (tset.preset_header) {
+ http_server_request_add_response_header(req,
+ "X-Dovecot-Test", "Payload");
+ }
+
if (strcmp(path, "/success") == 0) {
client_handle_success_request(creq);
return;
test_run_pipeline(test_client_echo);
test_run_parallel(test_client_echo);
test_end();
+
+ test_begin("http payload echo "
+ "(server non-blocking; 100-continue; preset header)");
+ test_init_defaults();
+ tset.request_100_continue = TRUE;
+ tset.preset_header = TRUE;
+ test_run_sequential(test_client_echo);
+ test_run_pipeline(test_client_echo);
+ test_run_parallel(test_client_echo);
+ test_end();
}
static void test_echo_server_blocking_sync(void)