Community
Participate
Working Groups
In cases when the browser (Firefox in my case) uses a character set ISO-8859-1 it replaces all non-supported characters with a escape code in form of { This is also true when uploading files with multipart/form-data POST method. The problem is not in the data itself but in the header of multipart/form-data where the filename can have special characters. In my case the header was: form-data; name="UploadedFile"; filename="Diplomsko Delo Lektorirano KONČNA.doc" MultiPartInputStream in parse method on the other hand handles the character ";" as a delimiter character between header elements and in case of "Diplomsko Delo Lektorirano KONČNA.doc" it splits the filename in between where the "special" character is present causing later on an StringIndexOutOfBoundsException. If the character set is UTF-8 however it work as it is supposed to because the "special" characters are not replaced with a escape code, but still the the parsing code should not fail in such a case.
Do you know if there is an RFC that describes this encoding and when it is used?
Never mind, I think I can ignore that encoding, just so long as I don't ignore the quotes. I've changed to using quotedStringTokenenizer instead of StringTokenizer and that appears to have done the trick (for a simple unit test). This is in r2344 of Jetty-7 and will get merged into Jetty-8 Jan - I'll leave this open and assign to you as I don't think this will be an automatic merge into 8 (plus I think there are other multipart changes for 8 to be done).
This fix has been merged into jetty-8 from jetty-7 via tag jetty-7-to-jetty-8-base-20101025-1.