lingochamp / FileDownloader

Multitask、MultiThread(MultiConnection)、Breakpoint-resume、High-concurrency、Simple to use、Single/NotSingle-process
Apache License 2.0
11.02k stars 2.2k forks source link

response code error: 400 for file with space in name in android api 17 #1138

Open salamgithub2017 opened 5 years ago

salamgithub2017 commented 5 years ago

i have a file with space in name( example : my image.png) and result is below error . but it is work great in api 24.

error:

com.liulishuo.filedownloader.exception.FileDownloadHttpException: response code error: 400, request headers: {Range=[bytes=0-]} response headers: {null=[HTTP/1.1 400 Bad Request], Connection=[close], Content-Length=[311], Content-Type=[text/html; charset=us-ascii], Date=[Thu, 01 Nov 2018 07:40:40 GMT], Server=[Microsoft-HTTPAPI/2.0], X-Android-Received-Millis=[1541058250826], X-Android-Sent-Millis=[1541058250814]}

rantianhua commented 5 years ago

I guess 400 bad request isn't relevant with your file name, because you error occurred during fetching data instead of trail connection. So, please provide a whole log so that I can find the real reason or you can provide your url so that I can do a test.