0

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.

Community
  • 1
  • 1
Asif Mulla
  • 1,652
  • 2
  • 22
  • 32
  • If you have access to it, look into the server's `error.log` to get more info about the request – Pekka Oct 21 '10 at 13:44
  • error.log doesn't show any error related to this bad request. Now confusing is it related to apache or browser or Kohana? – Asif Mulla Oct 22 '10 at 05:31
  • please provide the Apache log for an error entry. Rule of thumb, if Apache log exits with code 200 and you get a code 400 on browser it's Kohana's own doing that triggering the errors. – Frankie Oct 25 '10 at 13:22

1 Answers1

-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.

schwer
  • 123
  • 9
  • I have removed Host to shorten a link. Other files at same repository can be accessed without any problem. So issue of permission. – Asif Mulla Oct 22 '10 at 09:57
  • Sorry meant typing. May it's twice decoded. This would cause a problem if there is a '%' again, but not without. – schwer Oct 22 '10 at 10:07
  • Even though, if you directly put address in browser http://pdf/204153_20090605_Aluminiumacetotartraat_DCB_oordruppels_1,2%.pdf, it results in bad request only. – Asif Mulla Oct 22 '10 at 10:24
  • This is because the browser forwards to pdf.com. I think this not what you want. Anyway encoded url (%25 instead %) gives 404 Not found. – schwer Oct 22 '10 at 10:31