Skip to content
This repository was archived by the owner on Jul 13, 2021. It is now read-only.
This repository was archived by the owner on Jul 13, 2021. It is now read-only.

Dropping "CONNECT" request instead of 401 when auth is required #93

@zsoltm

Description

@zsoltm

I found a strange behaviour while handling CONNECT requests when authentication is enabled. If the client does not provide credentials the connection is just simply closed instead of responding with 401 and demanding (basic) authentication as it happens with regular proxy req's.

Could be tested easily:

CONNECT test.service:14442 HTTP/1.1
Host: test.service
Connection: keep-alive

Connection closed by foreign host.

... whereas:

CONNECT test.service:14442 HTTP/1.1
Host: test.service
Connection: keep-alive
Proxy-Authorization: Basic cHJveHk6dGVzdA==

HTTP/1.1 200 Tunnel established

Non-tunneling requests does it correctly:

GET http://test.service:14142/ HTTP/1.1
Host: test.service
Connection: keep-alive

HTTP/1.1 407 Proxy authentication required
Proxy-Authenticate: Basic realm="proxy-auth"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions