Skip to content

Commit

Permalink
lib-http: test-http-server-errors: Fixed logically dead code.
Browse files Browse the repository at this point in the history
Problem reported by Coverity.
  • Loading branch information
stephanbosch authored and sirainen committed Mar 16, 2017
1 parent 058ae8d commit a39b5b2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/lib-http/test-http-server-errors.c
Expand Up @@ -250,7 +250,7 @@ test_server_hanging_request_payload_input(struct _hanging_request_payload *ctx)

if (ret == 0)
return;
if (ret < 0) {
if (ctx->payload_input->stream_errno != 0) {
if (debug) {
i_debug("test server: failed to read payload: %s",
i_stream_get_error(ctx->payload_input));
Expand All @@ -262,6 +262,8 @@ test_server_hanging_request_payload_input(struct _hanging_request_payload *ctx)
http_server_request_unref(&req);
return;
}

i_assert(i_stream_is_eof(ctx->payload_input));

resp = http_server_response_create(req, 200, "OK");
http_server_response_submit(resp);
Expand Down

0 comments on commit a39b5b2

Please sign in to comment.