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

Error 400 "Bad Request" on long URL #1373

Open
mregnauld opened this issue Jul 5, 2021 · 0 comments
Open

Error 400 "Bad Request" on long URL #1373

mregnauld opened this issue Jul 5, 2021 · 0 comments

Comments

@mregnauld
Copy link

I implemented android-async-http on my Android project, so I can download files from AWS S3.

For obvious security reasons, the URL includes tokens information, and should be new each time I want to download (or resume) the same file.

But I have two issues:

  • since the URL needs to be new each time I download a file, I need to change it when I pause a download, then resume it later on
  • I have an error 400 Bad Request each time I try to download a file, using the following kind of URL:

https://test-audio-hd.s3.eu-central-1.amazonaws.com/1.ogg?X-Amz-Security-Token=IQoJb3JpZ2luX2VjEEcaDGV1LWNlbnRyYWwtMSJGMEQCIHVf%2BG7JJ7uw5COXkMQ5719dfyocDmgJljdMJYfKS4puAiBqI3ELGBf1e%2FVORkJldlBqQVZxWGVHq%2FislvqNhLdwFiqXBggwEAIaDDM4NzQ4OTE5MTY1MiIM6zYKkvbiRyY2cBWRKvQFXv2v2BCIAoZstGO5DU3s%2BCXC6KVGzBr6WDRY8ry%2Bf9t7Zy36TsuJA5cvtBkZnUm5igjRGlnTlUDyrTXG8D27eVG8f61wxgdgMx2TabL4yd%2FkUboYl%2B4RT45a0GGIxZm0n%2FXpP%2FOJlL8N598slZLndRbqY0qXEWGNCuakY%2FknXskpg2poL1g5w5uOziJIMggTNb3rnGSwfRcZd2h%2Bgi5ATsWBHZ41Oh9W2KGT5K6o0TJIm7yp4FsFFdMHgYsqlLpZVlxyqQqNds1K7PdkUKoSFZUQ%2BEEFq7ioUxWFPOpwlum6fRILKufEZeorERg01SC4QojDY7Pi%2BUcQfWb1zkQgJZBL33RxBCJqdmgsCAAeEg7Q1SYFwuD6P%2Bpugjzr4KVrpkC0ncy0JcWzSP5pCLJxzr9y2uSquXeels2BnE9j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Expires=3599&X-Amz-Credential=ASIAVUOBH23SCGGHNZ4T%2F20210705%2Feu-central-1%2Fs3%2Faws4_request&X-Amz-Signature=9161743269ff7e545dab11121a0660efe9b11c26b27801fd12a76db58701229b

Thanks for your help.

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