My application downloads files that are hosted on mediafire. For most of my users it works. But for a handful, the inputStream is returning with a getTotalLenth of 0. If I give them the links directly to download in their browser, it works fine.
What are some possible reasons the length would be 0? For example, is there header info I should be adding to ensure correct downloading? I’m currently creating the input stream with
OK I updated to the latest develop branch, and the error remains. I checked the HTTP status code and these users are receiving a 401 error (unauthorized user). What’s strange is they can download these files in their browser. They’re only getting 401 through the JUCE inputStream. I’m checking with Mediafire of course, but I wonder is there anything in general I can add as an extraHeader that helps prevent 401 errors?
Ed recently pushed a fix for a (rather embarrassing) OS X bug that I proudly master minded . If you were sending post data then the content-length and content-type headers would not be modified correctly. See this post: