EUDAT-B2SHARE / b2share

B2SHARE software for the EUDAT CDI services.
https://b2share.eudat.eu
GNU General Public License v2.0
35 stars 32 forks source link

HTTP API: make url trailing slash optional #1380

Open emanueldima opened 7 years ago

emanueldima commented 7 years ago

Currently B2SHARE works with the default Werkzeug strict_slashes policy, which requires urls to end with a trailing / for most routes (/records, /communities etc.). This is confusing for the users, which expect the same behaviour from /api/records and /api/records/ (2 reports about this issue from users).

nharraud commented 7 years ago

@emanueldima isn't this more a nice to have? Maybe we could remove the "important" tag. We are not responsible for people not reading the documentation.

nharraud commented 7 years ago

NOTE:

Problem: We have to be backward compatible. Disabling the redirect would just return 404 when the trailing slash is not given.

Suggested solution: Keep it like that for now.

Later we just try to make the urls consistent by either adding trailing slashes to URLs which don't have one or by removing them. Of course we wouldn't just add or remove without providing redirects in order to remain backward compatible.