Skip to content
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

Problem with path encoding of slashes and purl 1.2 #1

Open
duarnad opened this issue Feb 19, 2016 · 0 comments
Open

Problem with path encoding of slashes and purl 1.2 #1

duarnad opened this issue Feb 19, 2016 · 0 comments

Comments

@duarnad
Copy link

duarnad commented Feb 19, 2016

Hi,
First thanks for this very useful library.
We just met a problem due to purl upgrading from 1.1 to 1.2.
We have some scenarios with post requests like this one (including slashes) :
And I make a POST request to "users/{{ENCODED_EMAIL}}/contents/{{CONTENT_B64URL_ENCODED}}"
It was working but we recently see that the slashes were replace by %2f.
This is a new feature of purl 1.2 which manages slashes in path_segment.
With purl 1.1 the behavior is like this :

>> u = purl.URL().scheme('http').domain('www.example.com').path('/some/path').query_param('q', 'search term') 
>>> new_url = u.add_path_segment('here/there')
>>> str(new_url)
'http://www.example.com/some/path/here/there?q=search+term'

With purl 1.2 the behavior is like this :

>>> u = purl.URL().scheme('http').domain('www.example.com').path('/some/path').query_param('q', 'search term')
>>> new_url = u.add_path_segment('here/there')
>>> str(new_url)
'http://www.example.com/some/path/here%2Fthere?q=search+term'

Regards,
Arnaud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant