smanikandan14 / ThinDownloadManager

To download files and to avoid using DOWNLOAD_WITHOUT_NOTIFICATION permission if you are using Android's DownloadManager in your apps.
Apache License 2.0
783 stars 185 forks source link

Redirects with relative URL are not handled properly #96

Open mrStudent123 opened 7 years ago

mrStudent123 commented 7 years ago

I came across a redirect with a relative URL in the "Location" header, which results in a malformed URL exception.

example:

original url: something.com/test.html

gets redirected with a 3xx statusCode and header "Location" : "/test2.html"

what should be the url getting passed as location to the executeDownload method: "something.com/test2.html"

what actually is passed (and causes the malformed url exception): "/test2.html"

mrStudent123 commented 7 years ago

Just realised this is directly related to #65