Merge branch '5.1.x'
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2019 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -331,6 +331,7 @@ public final class ContentDisposition {
|
||||
do {
|
||||
int nextIndex = index + 1;
|
||||
boolean quoted = false;
|
||||
boolean escaped = false;
|
||||
while (nextIndex < headerValue.length()) {
|
||||
char ch = headerValue.charAt(nextIndex);
|
||||
if (ch == ';') {
|
||||
@@ -338,9 +339,10 @@ public final class ContentDisposition {
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (ch == '"') {
|
||||
else if (!escaped && ch == '"') {
|
||||
quoted = !quoted;
|
||||
}
|
||||
escaped = (!escaped && ch == '\\');
|
||||
nextIndex++;
|
||||
}
|
||||
String part = headerValue.substring(index + 1, nextIndex).trim();
|
||||
|
||||
Reference in New Issue
Block a user