]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: client: Removed curiously duplicated code.
authorStephan Bosch <stephan@dovecot.fi>
Thu, 19 May 2016 21:42:14 +0000 (23:42 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 20 Jun 2016 00:24:34 +0000 (03:24 +0300)
Probably a patch got applied with sufficient fuzz that it duplicated this code fragment, while it actually already existed.

src/lib-http/http-client-request.c

index 85157625adfdcf2bfe5f11704ee33599a932aaae..0c1a701363922c7e7b9fe3ef39d60a89b9d75f56 100644 (file)
@@ -1264,19 +1264,6 @@ void http_client_request_resubmit(struct http_client_request *req)
                }
        }
 
-       /* rewind payload stream */
-       if (req->payload_input != NULL && req->payload_size > 0) {
-               if (req->payload_input->v_offset != req->payload_offset &&
-                       !req->payload_input->seekable) {
-                       http_client_request_error(&req,
-                               HTTP_CLIENT_REQUEST_ERROR_ABORTED,
-                               "Resubmission failed: Cannot resend payload; stream is not seekable");
-                       return;
-               } else {
-                       i_stream_seek(req->payload_input, req->payload_offset);
-               }
-       }
-
        /* drop payload output stream from previous attempt */
        if (req->payload_output != NULL)
                o_stream_unref(&req->payload_output);