Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • A AndroidAsync
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 333
    • Issues 333
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 19
    • Merge requests 19
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Koushik Dutta
  • AndroidAsync
  • Merge requests
  • !38

Use Uri's raw path for creating GET string to avoid removing URL encoding

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/coreydowning/master into master Jul 16, 2013
  • Overview 2
  • Commits 1
  • Pipelines 0
  • Changes 2

Created by: coreydowning

We noticed a bug while using Ion for some file downloading and traced it down to the URI getting decoded in the GET string. You can reproduce the error we saw in Ion using something like the following:

Ion.with(context).load("http://jpkc.seiee.sjtu.edu.cn/ds/ds2/Course%20lecture/chapter%2010.pdf")
    .setLogging("IonSample", Log.DEBUG)
    .write(new File(context.getCacheDir(), "foo")).withResponse()
    .setCallback(new FutureCallback<Response<File>>() {
        @Override
        public void onCompleted(Exception e, Response<File> result) {
            if (e != null) {
                logger.writeLine("ERROR " + e.getMessage());
            } else {
                RawHeaders headers = result.getHeaders();
                if (headers.getResponseCode() != 200) {
                    logger.writeLine("Got a bad response code :( " + headers.getResponseCode() + ": " + headers.getResponseMessage());
                } else {
                    logger.writeLine("Success!");
                }
            }
        }
    });

AndroidAsync was making GETs with spaces in them which is invalid.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/coreydowning/master