]> 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)
committerStephan Bosch <stephan@dovecot.fi>
Thu, 26 May 2016 01:05:44 +0000 (03:05 +0200)
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 9c1f35806fc48322240cb5d77c92996ccb5a7b54..5d78a4bf69900c62cabbc755d6429301ec879303 100644 (file)
@@ -1285,19 +1285,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);