-
Notifications
You must be signed in to change notification settings - Fork 39
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
Cannot make request to BaseClient base_url without appending a trailing slash #363
Comments
What's the use case (keeping in mind that neither Also, in general I would consider a server that responded to |
So, on the former, On the latter, there seems to be a technical distinction on existence of the trailing slash. I personally would (cough do cough) consider it broken, but at least Flask differentiates so one mis-using Flask may not get the desired "irrelevant trailing slash" behavior. So, potentially easy fix of limited value. I won't argue against a quick close / no action on this. |
Yeah, in the beginning the That said, I'm not against a change to make URLs generated from a |
I guess this is the key: it seemed simple enough but has this situation that it doesn't handle (probably outside the scope of initial implementation concerns, but a case in any event), and I wouldn't want introducing a different approach, perhaps more complicated, to foul up the important cases it already handles. I guess would require more thoughtful review than may initially be obvious. |
After thinking about this for a while I think I've moved from neutral to pro on this change:
|
BaseClient.get("") should call the base URL without appending a slash if none was present. Makes it possible to call out to servers which care about this sort of thing. closes globus#363
If I create a new
BaseClient
and set thebase_url
property there is no way to make an HTTP request off of theBaseClient
to thebase_url
without a trailing slash (/
) appended to the URL.This is due to the manner in which the input url to the http method (e.g.
get()
) is appended to thebase_url
inslash_join()
. No value of input url (one might naturally try just""
) will result in the trailing slash not being appended.The text was updated successfully, but these errors were encountered: