This repository has been archived by the owner on Jan 30, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 87
Problematic deletion of trailing slashes in urls #70
Comments
Currently, that's just done for convenience on our part. You have an API that requires a slash at the end? |
Our custom API reacts somewhat opinionated, when forgetting the trailing slashes, resolving in a 404 error. |
I just ran into this, I'm encountering an API which does a redirect from non-slashed endpoint to an endpoint with an slash and messes up the response. |
Sorry about that; there's a PR open that needs some tweaking before we can fix this. I will try to clean it up myself this week. |
One workaround I found was to add an additional trailing slash at the end. |
alexlafroscia
added a commit
to alexlafroscia/ember-ajax
that referenced
this issue
Apr 23, 2016
The old way of building a URL was too brittle and didn't cover a lot of the different cases that could take place, in different combinations of the host, namespace, and segment having or not having slashes included. The new approach implemented here handles the various cases correctly, and ensures that we do not remove a trailing slash if one was provided. Closes ember-cli#70
alexlafroscia
added a commit
to alexlafroscia/ember-ajax
that referenced
this issue
Apr 23, 2016
The old way of building a URL was too brittle and didn't cover a lot of the different cases that could take place, in different combinations of the host, namespace, and segment having or not having slashes included. The new approach implemented here handles the various cases correctly, and ensures that we do not remove a trailing slash if one was provided. Closes ember-cli#70
alexlafroscia
added a commit
to alexlafroscia/ember-ajax
that referenced
this issue
Apr 23, 2016
The old way of building a URL was too brittle and didn't cover a lot of the different cases that could take place, in different combinations of the host, namespace, and segment having or not having slashes included. The new approach implemented here handles the various cases correctly, and ensures that we do not remove a trailing slash if one was provided. Closes ember-cli#70
alexlafroscia
added a commit
to alexlafroscia/ember-ajax
that referenced
this issue
May 30, 2016
The old way of building a URL was too brittle and didn't cover a lot of the different cases that could take place, in different combinations of the host, namespace, and segment having or not having slashes included. The new approach implemented here handles the various cases correctly, and ensures that we do not remove a trailing slash if one was provided. Closes ember-cli#70
For posterity: we just fixed this in our app by upgrading to 2.4.1 :) |
@jamesarosen excellent! Glad to hear it's working for you |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
See https://github.com/ember-cli/ember-ajax/blob/master/addon/ajax-request.js#L236
Why are trailing slashes removed?
Right now to keep the trailing slashes in pathes we must convert paths to absolute urls, which feels just not right.
The text was updated successfully, but these errors were encountered: