Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-58884

Http request handler should not crash in case of invalid URI in http request

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 7.2.4
    • 7.6.0, 7.0.0, 7.1.0, 7.2.0
    • ns_server
    • Untriaged
    • 0
    • Unknown

    Description

      Ns server can receive invalid URI in http requests. We should handle those request by returning error and don't crash.
      Example:

      $ cat invalid_http
      GET \ HTTP/1.1
      Host: localhost:8091
      Authorization: Basic QWRtaW5pc3RyYXRvcjphc2Rhc3Q=
      User-Agent: curl/7.87.0
      Accept: */*
       
       
      $ cat invalid_http | nc 127.0.0.1 8091
      HTTP/1.1 500 Internal Server Error
      Cache-Control: no-cache,no-store,must-revalidate
      Connection: close
      Content-Length: 44
      Content-Type: application/json
      Date: Fri, 29 Sep 2023 21:39:22 GMT
      Expires: Thu, 01 Jan 1970 00:00:00 GMT
      Pragma: no-cache
      Server: Couchbase Server
      X-Content-Type-Options: nosniff
      X-Frame-Options: DENY
      X-Permitted-Cross-Domain-Policies: none
      X-XSS-Protection: 1; mode=block
       
      ["Unexpected server error, request logged."]
      

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              ashwin.govindarajulu Ashwin Govindarajulu
              timofey.barmin Timofey Barmin
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty