Lines Matching refs:creq

204 client_handle_success_request(struct client_request *creq)
206 struct http_server_request *req = creq->server_req;
225 struct client_request *creq,
228 struct http_server_request *req = creq->server_req;
285 client_request_finish_payload_in(struct client_request *creq)
290 payload_input = iostream_temp_finish(&creq->payload_output, 4096);
293 (creq->server_req, 200, "OK");
302 client_request_read_echo(struct client_request *creq)
306 o_stream_set_max_buffer_size(creq->payload_output, IO_BLOCK_SIZE);
307 res = o_stream_send_istream(creq->payload_output, creq->payload_input);
308 o_stream_set_max_buffer_size(creq->payload_output, (size_t)-1);
318 "Failed to read all echo payload [%s]", creq->path);
321 "Failed to write all echo payload [%s]", creq->path);
324 client_request_finish_payload_in(creq);
325 i_stream_unref(&creq->payload_input);
329 client_request_read_echo_more(struct client_request *creq)
331 client_request_read_echo(creq);
333 if (creq->payload_input != NULL)
336 io_remove(&creq->io);
340 "finished receiving payload for %s", creq->path);
345 client_handle_echo_request(struct client_request *creq,
348 struct http_server_request *req = creq->server_req;
355 creq->path = p_strdup
368 (creq->server_req, 200, "OK");
422 creq->payload_output = payload_output;
426 creq->payload_input =
431 i_stream_create_limit(creq->payload_input, read_server_partial);
432 i_stream_unref(&creq->payload_input);
433 creq->payload_input = partial;
436 creq->io = io_add_istream(creq->payload_input,
437 client_request_read_echo_more, creq);
438 client_request_read_echo_more(creq);
443 client_request_finish_payload_in, creq);
446 creq->payload_input =
449 client_request_read_echo, creq);
458 http_server_request_destroyed(struct client_request *creq);
464 struct client_request *creq;
469 creq = p_new(pool, struct client_request, 1);
470 creq->client = client;
471 creq->server_req = req;
474 http_server_request_destroyed, creq);
476 return creq;
481 struct client_request *creq = *_creq;
482 struct http_server_request *req = creq->server_req;
486 if (creq->io != NULL) {
487 i_stream_unref(&creq->payload_input);
488 io_remove(&creq->io);
495 http_server_request_destroyed(struct client_request *creq)
497 client_request_deinit(&creq);
508 struct client_request *creq;
515 creq = client_request_init(client, req);
518 client_handle_success_request(creq);
527 client_handle_download_request(creq, p);
531 client_handle_echo_request(creq, p);