From: Timo Sirainen Date: Sat, 10 Aug 2013 13:31:27 +0000 (+0300) Subject: lib-http: Removed more code duplication X-Git-Tag: 2.2.6~139 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7ec4907a598d72dc058eb11d97a86b8cd254d5bd;p=thirdparty%2Fdovecot%2Fcore.git lib-http: Removed more code duplication --- diff --git a/src/lib-http/http-client-request.c b/src/lib-http/http-client-request.c index 1bd4da73c5..9b47059148 100644 --- a/src/lib-http/http-client-request.c +++ b/src/lib-http/http-client-request.c @@ -627,26 +627,6 @@ void http_client_request_redirect(struct http_client_request *req, req->payload_offset = 0; } - /* https://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-21 - Section-7.4.4 - - -> A 303 `See Other' redirect status response is handled a bit differently. - Basically, the response content is located elsewhere, but the original - (POST) request is handled already. - */ - if (status == 303 && strcasecmp(req->method, "HEAD") != 0 && - strcasecmp(req->method, "GET") != 0) { - // FIXME: should we provide the means to skip this step? The original - // request was already handled at this point. - req->method = p_strdup(req->pool, "GET"); - - /* drop payload */ - if (req->payload_input != NULL) - i_stream_unref(&req->payload_input); - req->payload_size = 0; - req->payload_offset = 0; - } - /* resubmit */ req->state = HTTP_REQUEST_STATE_NEW; http_client_request_do_submit(req);