Skip to content
This repository was archived by the owner on Jul 26, 2023. It is now read-only.

Commit 226f271

Browse files
Update logs handling and statsd (#21)
* Update logs handling and statsd * Small update * Snapshot version
1 parent 42c7cf3 commit 226f271

File tree

9 files changed

+13
-14
lines changed

9 files changed

+13
-14
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ When you build the latest code from source, you'll have access to the latest sna
395395
<dependency>
396396
<groupId>net.lightbody.bmp</groupId>
397397
<artifactId>browsermob-core</artifactId>
398-
<version>2.1.29-SNAPSHOT</version>
398+
<version>2.1.30-SNAPSHOT</version>
399399
<scope>test</scope>
400400
</dependency>
401401
```

browsermob-core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<artifactId>browsermob-proxy</artifactId>
88
<groupId>net.lightbody.bmp</groupId>
9-
<version>2.1.29-SNAPSHOT</version>
9+
<version>2.1.30-SNAPSHOT</version>
1010
</parent>
1111
<modelVersion>4.0.0</modelVersion>
1212

browsermob-core/src/main/java/net/lightbody/bmp/filters/BlacklistFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public HttpResponse clientToProxyRequest(HttpObject httpObject) {
3939

4040
if (entry.matches(url, httpRequest.method().name())) {
4141
HttpResponseStatus status = HttpResponseStatus.valueOf(entry.getStatusCode());
42-
HttpResponse resp = new DefaultFullHttpResponse(httpRequest.getProtocolVersion(), status);
42+
HttpResponse resp = new DefaultFullHttpResponse(httpRequest.protocolVersion(), status);
4343
HttpUtil.setContentLength(resp, 0L);
4444

4545
return resp;

browsermob-core/src/main/java/net/lightbody/bmp/filters/StatsDMetricsFilter.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
import com.timgroup.statsd.NonBlockingStatsDClient;
44
import com.timgroup.statsd.StatsDClient;
55
import io.netty.channel.ChannelHandlerContext;
6+
import io.netty.handler.codec.http.FullHttpResponse;
67
import io.netty.handler.codec.http.HttpObject;
78
import io.netty.handler.codec.http.HttpRequest;
89
import io.netty.handler.codec.http.HttpResponse;
910
import org.apache.commons.lang3.StringUtils;
1011
import org.apache.commons.lang3.math.NumberUtils;
11-
import org.littleshoot.proxy.HttpFiltersAdapter;
1212

1313
import java.net.URI;
1414
import java.net.URISyntaxException;
@@ -19,11 +19,10 @@ public StatsDMetricsFilter(HttpRequest originalRequest, ChannelHandlerContext ct
1919
}
2020

2121
@Override
22-
public HttpObject serverToProxyResponse(HttpObject httpObject) {
23-
if (HttpResponse.class.isAssignableFrom(httpObject.getClass())) {
24-
HttpResponse httpResponse = (HttpResponse) httpObject;
25-
int status = httpResponse.status().code();
26-
prepareStatsDMetrics(status);
22+
public HttpObject proxyToClientResponse(HttpObject httpObject) {
23+
if (FullHttpResponse.class.isAssignableFrom(httpObject.getClass())) {
24+
HttpResponse httpResponse = (FullHttpResponse) httpObject;
25+
prepareStatsDMetrics(httpResponse.status().code());
2726
}
2827
return super.serverToProxyResponse(httpObject);
2928
}

browsermob-dist/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<artifactId>browsermob-proxy</artifactId>
66
<groupId>net.lightbody.bmp</groupId>
7-
<version>2.1.29-SNAPSHOT</version>
7+
<version>2.1.30-SNAPSHOT</version>
88
</parent>
99
<modelVersion>4.0.0</modelVersion>
1010

browsermob-legacy/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<artifactId>browsermob-proxy</artifactId>
88
<groupId>net.lightbody.bmp</groupId>
9-
<version>2.1.29-SNAPSHOT</version>
9+
<version>2.1.30-SNAPSHOT</version>
1010
</parent>
1111
<modelVersion>4.0.0</modelVersion>
1212

browsermob-rest/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<parent>
66
<artifactId>browsermob-proxy</artifactId>
77
<groupId>net.lightbody.bmp</groupId>
8-
<version>2.1.29-SNAPSHOT</version>
8+
<version>2.1.30-SNAPSHOT</version>
99
</parent>
1010
<modelVersion>4.0.0</modelVersion>
1111

mitm/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<artifactId>browsermob-proxy</artifactId>
66
<groupId>net.lightbody.bmp</groupId>
7-
<version>2.1.29-SNAPSHOT</version>
7+
<version>2.1.30-SNAPSHOT</version>
88
</parent>
99
<modelVersion>4.0.0</modelVersion>
1010

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>net.lightbody.bmp</groupId>
55
<artifactId>browsermob-proxy</artifactId>
6-
<version>2.1.29-SNAPSHOT</version>
6+
<version>2.1.30-SNAPSHOT</version>
77
<modules>
88
<module>browsermob-core</module>
99
<module>browsermob-legacy</module>

0 commit comments

Comments
 (0)