https://bz.apache.org/bugzilla/show_bug.cgi?id=59115

--- Comment #3 from Udo Schnurpfeil <lof...@apache.org> ---
I've made some tests with different browsers and I found these encodings in the
filename part:

(filename) -> (content-disposition)
: -> :
/ -> :
\ -> \
\\ -> \
" -> \" (Firefox) and %22 (Chrome+Safari)
%22 -> %22

This leads to 3 problems:
1. The resulting string : doesn't differ between : and / so there is not
possibility to know what was the source.
2. The resulting string \ doesn't differ between \\ and \ so there is also not
possibility to find the source.
3. In Chrome+Safari we cannot differ between " and %22

I know these character are unusual, but not invalid on some OS.

For the moment I have best results with this code:

fileName = fileName.trim().replaceAll("\\\\\\\"", "\""); // replaces \" with "

I don't know which RFC is relevant here? But it looks for me, that we have
different file names 
resulting in same header information.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to