downloadFile error 406 issue
Posted: Sat Sep 06, 2014 4:14 am
When attempting to download an image using downloadFile from my personal server, it's throwing an error 406 message at me ("Not Acceptable", for those unfamiliar). Fetching the same file from a browser works fine. I grabbed the communication chain with wireshark to see what's going awry, but I can't see anything obviously wrong there. Theoretically error 406 should mean the accept header sent by Mudlet is wrong. Granted, I'm years out of practice when it comes to dealing with apache, TCP, PHP, etc, but even still I'm wondering if someone has insight. I noticed Akaya had the same issue here, which was left unanswered.
EDIT: I removed a bit of information here because I've identified the issue, but have no simple solution. This is caused by apache Mod_Security rule 900095, "Bad UA :: Fake Mozilla Agent". This will be an issue on any server using the boilerplate Mod_Security rules, and that includes irreparably most shared hosting providers. Mudlet identifies itself with the full UA string "Mozilla/5.0". Updating this to a more accurate UA would appear to fix the issue, though I'm unsure what that would be. Is this something that can't be adjusted for some reason?
EDIT: I removed a bit of information here because I've identified the issue, but have no simple solution. This is caused by apache Mod_Security rule 900095, "Bad UA :: Fake Mozilla Agent". This will be an issue on any server using the boilerplate Mod_Security rules, and that includes irreparably most shared hosting providers. Mudlet identifies itself with the full UA string "Mozilla/5.0". Updating this to a more accurate UA would appear to fix the issue, though I'm unsure what that would be. Is this something that can't be adjusted for some reason?