We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rqPathInfo
Not sure if this is a documentation bug or an issue in addRoutes
addRoutes
The documentation specifies the invariant
snap-core/src/Snap/Internal/Http/Types.hs
Lines 462 to 470 in 0b45d71
However, I have noticed when mounting a path via
addRoutes [("/foo/", fooHandler]
that when dumping the request paths via
liftIO (print rq) liftIO (print $ ((rqContextPath rq, rqPathInfo rq, rqQueryString rq), rqURI rq))
You can see that the invariant breaks for the GET /foo HTTP/1.1 corner case:
GET /foo HTTP/1.1
GET /foo HTTP/1.1 accept: */* user-agent: curl/7.58.0 host: localhost:8080 sn="localhost:8080" c=127.0.0.1:52732 s=127.0.0.1:8080 ctx=/foo/ clen=n/a (("/foo/","",""),"/foo")
GET /foo/ HTTP/1.1 accept: */* user-agent: curl/7.58.0 host: localhost:8080 sn="localhost:8080" c=127.0.0.1:52734 s=127.0.0.1:8080 ctx=/foo/ clen=n/a (("/foo/","",""),"/foo/")
GET /foo// HTTP/1.1 accept: */* user-agent: curl/7.58.0 host: localhost:8080 sn="localhost:8080" c=127.0.0.1:52736 s=127.0.0.1:8080 ctx=/foo/ clen=n/a (("/foo/","/",""),"/foo//")
GET /foo/// HTTP/1.1 accept: */* user-agent: curl/7.58.0 host: localhost:8080 sn="localhost:8080" c=127.0.0.1:52738 s=127.0.0.1:8080 ctx=/foo/ clen=n/a (("/foo/","//",""),"/foo///")
The text was updated successfully, but these errors were encountered:
Another corner-case where it doesn't hold:
GET /foo? HTTP/1.1 accept: */* user-agent: curl/7.58.0 host: localhost:8080 sn="localhost:8080" c=127.0.0.1:52834 s=127.0.0.1:8080 ctx=/foo/ clen=n/a (("/foo/","",""),"/foo?")
Sorry, something went wrong.
Pinging @gregorycollins
No branches or pull requests
Not sure if this is a documentation bug or an issue in
addRoutes
The documentation specifies the invariant
snap-core/src/Snap/Internal/Http/Types.hs
Lines 462 to 470 in 0b45d71
However, I have noticed when mounting a path via
addRoutes [("/foo/", fooHandler]
that when dumping the request paths via
You can see that the invariant breaks for the
GET /foo HTTP/1.1
corner case:The text was updated successfully, but these errors were encountered: