Skip to content

Commit

Permalink
Merge branch 'feature/java-scala-0.2.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderdean committed Jul 23, 2014
2 parents 3d65fa7 + 5970895 commit 95bfbd1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 4 additions & 0 deletions java-scala/CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Version 0.2.2 (2014-07-23)
--------------------------
Fixed Java referer-parser doesn't work on Hadoop (#76)

Version 0.2.1 (2014-07-16)
--------------------------
Updated build process for local Maven publishing (#72)
Expand Down
2 changes: 1 addition & 1 deletion java-scala/project/BuildSettings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ object BuildSettings {
// Basic settings for our app
lazy val basicSettings = Seq[Setting[_]](
organization := "com.snowplowanalytics",
version := "0.2.1",
version := "0.2.2",
description := "Library for extracting marketing attribution data from referer URLs",
scalaVersion := "2.9.1",
crossScalaVersions := Seq("2.9.1", "2.10.4", "2.11.1"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public Referer parse(URI refererUri, String pageHost, List<String> internalDomai
}

public Referer parse(URL refererUrl, String pageHost){
if(refererUrl == null) { return null; }
if (refererUrl == null) { return null; }
return parse(refererUrl.getProtocol(), refererUrl.getHost(), refererUrl.getPath(), refererUrl.getQuery(), pageHost);
}

Expand Down Expand Up @@ -202,9 +202,12 @@ private String extractSearchTerm(String query, List<String> possibleParameters)

List<NameValuePair> params;
try {
params = URLEncodedUtils.parse(query, Charset.forName("UTF-8"));
params = URLEncodedUtils.parse(new URI("http://localhost?" + query), "UTF-8");
// params = URLEncodedUtils.parse(query, Charset.forName("UTF-8")); because https://github.com/snowplow/referer-parser/issues/76
} catch (IllegalArgumentException iae) {
return null;
} catch (URISyntaxException use) { // For new URI
return null;
}

for (NameValuePair pair : params) {
Expand Down

0 comments on commit 95bfbd1

Please sign in to comment.