Failed to parse request: invalid uri
eugenepaniot opened this issue · 3 comments
eugenepaniot commented
Line 738 in 606fa09
Tarantool suggests the url request /some/valid/path./
as invalid, but it should not.
httpd:route({ path = '/some/valid/*path', method = 'GET', public = true }, http_middleware.v1(handle_get_path, http_collector) )
I need to get request path
as is.
Thank you.
How to reproduce:
$ curl -v 'http://127.1:8081/some/valid/path./'
* Trying 127.0.0.1:8081...
* Connected to 127.0.0.1 (127.0.0.1) port 8081 (#0)
> GET /some/valid/path./ HTTP/1.1
> Host: 127.0.0.1:8081
> User-Agent: curl/7.84.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
* HTTP 1.0, assume close after body
< HTTP/1.0 400 Bad request
<
* Closing connection 0
invalid uri
Totktonada commented
NB: It comes from ff01a94.
Totktonada commented
So it was implemented for the http client (now an http client is built into tarantool itself). And it is anyway a strange thing. It is valid URI with relative path. I don't see a proper reason to ban it.
0x501D commented
Does the http client handle "./" and "../" as per rfc3986 clause 5.2.4. "Remove Dot Segments"?