File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -247,6 +247,13 @@ private void applyAuthParams(Map<String, String> authParams)
247
247
}
248
248
}
249
249
250
+ /**
251
+ * Percent-encode a parameter for construction of the base string and the Authorization header,
252
+ * as specified in http://tools.ietf.org/html/rfc5849#section-3.6
253
+ *
254
+ * @param p Unencoded string
255
+ * @return Encoded text
256
+ */
250
257
private String encodeParameter (String p )
251
258
{
252
259
String encoded = URLEncoder .encodeUriComponent (p );
@@ -261,7 +268,8 @@ private String encodeParameter(String p)
261
268
lastEnd = m .end ();
262
269
}
263
270
sb .append (encoded .substring (lastEnd ));
264
- return sb .toString ();
271
+ return sb .toString ().replaceAll ("!" , "%21" ).replaceAll ("\\ (" , "%28" ).replaceAll ("\\ )" , "%29" )
272
+ .replaceAll ("\\ *" , "%2A" );
265
273
}
266
274
267
275
@ SuppressWarnings ("unchecked" )
You can’t perform that action at this time.
0 commit comments