Uploaded image for project: 'Traffic Server'
  1. Traffic Server
  2. TS-1643

Traffic Server 3.2.0 sends default error response instead of "request#no_content_length" for Post requests with no Content-Length header.

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3.1
    • Component/s: HTTP
    • Labels:
      None

      Description

      When custom error responses are enabled and HTTP post request is sent with no "Content-Length" header Traffic server sends back the default response instead of "request#no_content_length".
      To reproduce the issue following records.config configuration variable should be set to 1.

      proxy.config.body_factory.enable_customizations

      In function "HttpTransact::is_request_valid" the following function call is not correct.

      build_error_response(s, HTTP_STATUS_BAD_REQUEST, "request#no_content_length", "Content Length Required", const_cast < char *>(URL_MSG));

      The third and fourth parameters should be swapped.

      build_error_response(s, HTTP_STATUS_BAD_REQUEST, "Content Length Required", "request#no_content_length", const_cast < char *>(URL_MSG));

        Attachments

          Activity

            People

            • Assignee:
              jamespeach James Peach
              Reporter:
              mudassar.jafer Mudassar Jafer
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: