pistacheio / pistache

A high-performance REST toolkit written in C++
https://pistacheio.github.io/pistache/
Apache License 2.0
3.12k stars 688 forks source link

Pistache not support absolute URI with HTTP/1.1 protocol #1144

Open wufanqqfsc opened 1 year ago

wufanqqfsc commented 1 year ago

According to HTTP/1.1: Request (w3.org)

"The absoluteURI form is REQUIRED when the request is being made to a proxy." ... "all HTTP/1.1 servers MUST accept the absolute URI form in requests, even though HTTP/1.1 clients will only generate them in requests to proxies."

But seems Pistache just can handler the relative path and not support the absolute URI.

Just like the curl http request CMD:

curl -X PATCH http://127.0.0.1:8080/ -v --request-target http://127.0.0.1:8080/xxx --path-as-is -H "Host: 127.0.0.1:8080" -H "Content-Type:"

And Pistache will can't find the route path for this URI: "http://127.0.0.1:8080/xxx" and using the default handler.