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

Invalid URL transformation after version 1.4.7 #966

Closed
divyenduz opened this issue Sep 22, 2015 · 2 comments
Closed

Invalid URL transformation after version 1.4.7 #966

divyenduz opened this issue Sep 22, 2015 · 2 comments
Assignees
Labels
Milestone

Comments

@divyenduz
Copy link

Our API has endpoints like

<endpoint>/get_data/<slug>
Where slug = <sportname>%2f<title>
for eg. football%2fronaldo-scores-a-goal
%2f is html form of /

The library was working for us up to version 1.4.6. BUT after upgrading to version 1.4.7 the slug gets auto converted to
football/ronaldo-scores-a-goal

So, something got triggered in version 1.4.7 converting %2f to /
I am trying to figure out the same by reading the commits in tag 1.4.7
BTW this link is not working (https://github.com/loopj/android-async-http/commits1.4.7)

Also, we will need a API to disable this transformation. If that can't be done, I will need to maintain a fork of this project as a upstream.

As well, kudos for the good work.
Thanks

smarek added a commit that referenced this issue Sep 22, 2015
@smarek
Copy link
Member

smarek commented Sep 22, 2015

Version 1.4.7 changelog states, Fixed URL encoding feature, that was breaking whole URL, not just path and query parts, which is issue #691 and related commit b3e15c3

If you don't want the URL to be automatically encoded, and possibly fixed if it contains errors, call setURLEncodingEnabled(false) on AsyncHttpClient instance, see the source for reference:
https://github.com/loopj/android-async-http/blob/b3e15c3d1d51e3faf74336d8c82860e022f6bfc8/library/src/main/java/com/loopj/android/http/AsyncHttpClient.java#L1214

@smarek smarek closed this as completed Sep 22, 2015
@smarek smarek self-assigned this Sep 22, 2015
@smarek smarek added this to the 1.4.9.1 milestone Sep 22, 2015
@divyenduz
Copy link
Author

Thanks

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

No branches or pull requests

2 participants