merlimat commented on a change in pull request #2888: PIP-25: Token based
authentication
URL: https://github.com/apache/pulsar/pull/2888#discussion_r236794312
##########
File path:
pulsar-common/src/main/java/org/apache/pulsar/client/api/url/DataURLStreamHandler.java
##########
@@ -57,20 +60,23 @@ public void connect() throws IOException {
if (this.uri == null) {
throw new IOException();
}
- Pattern pattern = Pattern.compile(
-
"(?<mimeType>.+?)(;(?<charset>charset=.+?))?(;(?<base64>base64?))?,(?<data>.+)",
Pattern.DOTALL);
+
Matcher matcher =
pattern.matcher(this.uri.getSchemeSpecificPart());
if (matcher.matches()) {
this.contentType = matcher.group("mimeType");
- String charset = matcher.group("charset");
- if (charset == null) {
- charset = "US-ASCII";
+ if (contentType == null) {
+ this.contentType = "application/data";
}
+
+ for (int i =0; i < matcher.groupCount(); i++) {
+ System.out.println("Group: " + matcher.group(i));
Review comment:
Ups, forgot when debugging
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services