-
-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
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
split_target
over string beginning with exactly two slashes
#248
Comments
Handle the request unchanged if the target seems canonical, otherwise: * Turns repeated slashes into a single one * Drop the last slash * Redirect to the resulting target Note: Dream.split_targer bugged? When passed a string beginning with exactly two slashes, split_target drops everything before the first slash. See: aantron/dream#248 As a work around, three slashes are preprended to all targets
Handle the request unchanged if the target seems canonical, otherwise: * Turns repeated slashes into a single one * Drop the last slash * Redirect to the resulting target Note: Dream.split_targer bugged? When passed a string beginning with exactly two slashes, split_target drops everything before the first slash. See: aantron/dream#248 As a work around, three slashes are preprended to all targets
* Drop extra slashes Handle the request unchanged if the target seems canonical, otherwise: * Turns repeated slashes into a single one * Drop the last slash * Redirect to the resulting target Note: Dream.split_targer bugged? When passed a string beginning with exactly two slashes, split_target drops everything before the first slash. See: aantron/dream#248 As a work around, three slashes are preprended to all targets * Formatting --------- Co-authored-by: Cuihtlauac ALVARADO <[email protected]>
It's probably related to dream/test/expect/pure/formats/target/target.ml Lines 19 to 22 in 599efd5
and the test's output
and may be an upstream issue indeed. I am looking into this now. Ultimately, it should be possible to work around it by reimplementing it, even if it turns out to be an issue in Uri. |
I've left a detailed comment about this in the issue you opened, mirage/ocaml-uri#167 (thanks for that). I suggest we wait to see if there is a fix for this in ocaml-uri soon. If not, we can work around it in Dream for the next release. |
I believe the behaviour of
split_target
is wrong when it is passed a string which begins with exactly two slashes:The text was updated successfully, but these errors were encountered: