|
|
|
@ -1,5 +1,5 @@
@@ -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 {
@@ -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 {
@@ -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(); |
|
|
|
|