HTTP - 400 bad request while downloading file

只愿长相守 提交于 2019-12-11 23:52:55

问题


After further investigation on basis of previous question url encode/decode is working properly. Issue is something with Apache server (might be) which serves file download request Specially if my file name ends with % sign, it fails. For e.g.


Original File name:

204153_20090605_Aluminiumacetotartraat_DCB_oordruppels_1,2%.pdf 



Url in browser after clicking on download link:

http://pdf/204153_20090605_Aluminiumacetotartraat_DCB_oordruppels_1%2C2%25.pdf

This returns 400 error with bad request. I am using LAMP with Kohana 3 framework.

Please guide.

Thanks is advance.


回答1:


You missed a Host in the address. If it's only tipping fault the server may does not have permissions to access the file.



来源:https://stackoverflow.com/questions/3988028/http-400-bad-request-while-downloading-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!