Support Windows path in ContentDisposition::parse
This commit makes sure that ContentDisposition::parse supports Windows path with a backslash. Closes gh-30111
This commit is contained in:
@@ -624,7 +624,11 @@ public final class ContentDisposition {
|
||||
char c = filename.charAt(i);
|
||||
if (filename.charAt(i) == '\\' && i + 1 < length) {
|
||||
i++;
|
||||
sb.append(filename.charAt(i));
|
||||
char next = filename.charAt(i);
|
||||
if (next != '"' && next != '\\') {
|
||||
sb.append(c);
|
||||
}
|
||||
sb.append(next);
|
||||
}
|
||||
else {
|
||||
sb.append(c);
|
||||
|
||||
Reference in New Issue
Block a user