401 - Unauthorized is returned for a non-existing URL request

Solution Verified - Updated -

Issue

  • HTTP/HTTPS requests for non-existing endpoints return 401 - Unauthorized instead of the expected response 404 - Not Found.
  • Invoking a non-existing /test endpoint returns 401 - Unauthorized

    curl -v http://localhost:8181/test
    *   Trying 127.0.0.1...
    * TCP_NODELAY set
    * Connected to localhost (127.0.0.1) port 8181 (#0)
    > GET /test HTTP/1.1
    > Host: localhost:8181
    > User-Agent: curl/7.61.1
    > Accept: */*
    > 
    < HTTP/1.1 401 Unauthorized
    < WWW-Authenticate: Basic realm="karaf"
    < Content-Length: 0
    < Server: Jetty(9.2.23.v20171218)
    <
    * Connection #0 to host localhost left intact
    
  • karaf realm catches all HTTP requests

Environment

  • Red Hat Fuse (Fuse) 6.3

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content