From: Amos Jeffries Date: Sun, 5 Jun 2011 15:23:45 +0000 (+1200) Subject: HTTP/1.1: Send 505 Unsupported Version on mangled version codes X-Git-Tag: take08~55^2~147 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e526b3686a0a4254425d0e720cdcf6c2c45f82e1;p=thirdparty%2Fsquid.git HTTP/1.1: Send 505 Unsupported Version on mangled version codes The top level parser is emitting HTTP status codes when it discovers malformed request line syntax. Pass the info on in the client response. At present only the unsuported-version code is available in HTTP. --- diff --git a/src/client_side.cc b/src/client_side.cc index 6136fa8a20..bb874e05e2 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -2442,7 +2442,7 @@ clientProcessRequest(ConnStateData *conn, HttpParser *hp, ClientSocketContext *c repContext->setReplyToError(ERR_UNSUP_REQ, HTTP_METHOD_NOT_ALLOWED, method, http->uri, conn->peer, NULL, conn->in.buf, NULL); break; default: - repContext->setReplyToError(ERR_INVALID_REQ, HTTP_BAD_REQUEST, method, http->uri, conn->peer, NULL, conn->in.buf, NULL); + repContext->setReplyToError(ERR_INVALID_REQ, hp->request_parse_status, method, http->uri, conn->peer, NULL, conn->in.buf, NULL); } assert(context->http->out.offset == 0); context->pullData();