File tree 2 files changed +10
-2
lines changed
main/java/org/springframework/web/util
test/java/org/springframework/web/util
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -554,7 +554,7 @@ public boolean isAllowed(int c) {
554
554
QUERY_PARAM {
555
555
@ Override
556
556
public boolean isAllowed (int c ) {
557
- if ('=' == c || '+' == c || ' &' == c ) {
557
+ if ('=' == c || '&' == c ) {
558
558
return false ;
559
559
}
560
560
else {
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2016 the original author or authors.
2
+ * Copyright 2002-2017 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -189,6 +189,14 @@ public void fromUriStringQueryParamWithReservedCharInValue() throws URISyntaxExc
189
189
assertEquals ("1USD=?EUR" , result .getQueryParams ().getFirst ("q" ));
190
190
}
191
191
192
+ @ Test // SPR-14828
193
+ public void fromUriStringQueryParamEncodedAndContainingPlus () throws Exception {
194
+ String httpUrl = "http://localhost:8080/test/print?value=%EA%B0%80+%EB%82%98" ;
195
+ URI uri = UriComponentsBuilder .fromHttpUrl (httpUrl ).build (true ).toUri ();
196
+
197
+ assertEquals (httpUrl , uri .toString ());
198
+ }
199
+
192
200
@ Test // SPR-10779
193
201
public void fromHttpUrlStringCaseInsesitiveScheme () {
194
202
assertEquals ("http" , UriComponentsBuilder .fromHttpUrl ("HTTP://www.google.com" ).build ().getScheme ());
You can’t perform that action at this time.
0 commit comments