00cpxxx / proxylite

Simple, single-thread, non-caching, lightweight HTTP proxy server
GNU Lesser General Public License v2.1
16 stars 7 forks source link

requests like `GET http://HOST:PORT/path HTTP/1.1` are sent with no modification #3

Open Camouflager opened 1 year ago

Camouflager commented 1 year ago

I'm not sure if this is intended. But I'm encountering an issue where such requests are sent. And I guess the server is expecting something like GET /path HTTP/1.1 so it responds with 404. I've compared with tinyproxy and it's indeed sending GET /path HTTP/1.1 instead of GET http://HOST:PORT/path HTTP/1.1. So maybe it's a bug?

00cpxxx commented 1 year ago

Thanks for the message, I'll take a look during next week.

Camouflager commented 1 year ago

according to this https://cbonte.github.io/haproxy-dconv/1.7/configuration.html#1.2 . It may be that the server doesn't support HTTP/1.1 protocols

00cpxxx commented 1 year ago

Do you have any example of client software that is generating the request like that? And also if you have the target server address it will help. I was checking and I don't see reason to act in this case, but I'm still reading docs on HTTP rfc.

Camouflager commented 1 year ago

The client software that's related to this is https://apps.apple.com/us/app/official-kodi-remote/id520480364 . And the server is in my home network.

I may have phrased the issue incorrectly. The requests sent by proxylite are as described, which are valid HTTP/1.1 requests. However the server responds with 404. So I tried tinyproxy and it works. And the requests don't use absolute uris.

As is described by the document from haproxy. HTTP/1.0 requests may not support absolute uris. So I guess it may be related.

  • An "absolute URI", also called a "URL" :

    http://192.168.0.12:8080/serv/login.php?lang=en&profile=2

    It is composed of a "scheme" (the protocol name followed by '://'), a host name or address, optionally a colon (':') followed by a port number, then a relative URI beginning at the first slash ('/') after the address part. This is generally what proxies receive, but a server supporting HTTP/1.1 must accept this form too.