[jscover] 59/69: Update sonatype parent
Sylvestre Ledru
sylvestre at moszumanska.debian.org
Fri Aug 22 05:54:09 UTC 2014
This is an automated email from the git hooks/post-receive script.
sylvestre pushed a commit to branch master
in repository jscover.
commit a168a22f31f69971fca1208e1335ee8be45ddd23
Author: tntim96 <tntim96 at gmail.com>
Date: Thu Aug 14 19:17:42 2014 +1000
Update sonatype parent
---
History.md | 1 +
doc/links.html | 4 ++--
src/main/java/jscover/server/ProxyService.java | 4 ++++
src/test/java/jscover/server/ProxyServiceTest.java | 13 ++++++++++++-
4 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/History.md b/History.md
index c662359..cf2399a 100644
--- a/History.md
+++ b/History.md
@@ -1,5 +1,6 @@
1.0.14 / 2014-??-??
==================
+ * Remove 'Proxy-Connection' header to avoid persistent connections (https://github.com/tntim96/JSCover/pull/158)
* Decode URI in proxy mode
* Add logging to merge and report code
* Internal: Upgrade to Jasmine 2.0.1
diff --git a/doc/links.html b/doc/links.html
index f90fde4..a48803c 100644
--- a/doc/links.html
+++ b/doc/links.html
@@ -19,8 +19,8 @@
<a href="http://www.todomvc-under-test.com/" target="_blank">TodoMVC - Under Test</a><br/>
<a href="https://github.com/trevmex/EnvJasmine/tree/master/lib/jscover" target="_blank">EnvJasmine</a><br/>
<a href="https://github.com/KingHenne/grunt-jscover" target="_blank">grunt-jscover</a><br/>
- <a href="https://github.com/fengmk2/jscover" target="_blank">JSCover (wrapper for Node.js)</a><br/>
- <a href="http://www.webpagetest.org/" target="_blank">webpagetest</a> (<a href="https://code.google.com/p/webpagetest/source/browse/trunk/agent/js/node_modules/jscover/lib/jscover.js" target="_blank">JSCover</a>)<br/>
+ <!--<a href="https://github.com/fengmk2/jscover" target="_blank">JSCover (wrapper for Node.js)</a><br/>-->
+ <!--<a href="http://www.webpagetest.org/" target="_blank">webpagetest</a> (<a href="https://code.google.com/p/webpagetest/source/browse/trunk/agent/js/node_modules/jscover/lib/jscover.js" target="_blank">JSCover</a>)<br/>-->
</p>
<h2>Useful</h2>
diff --git a/src/main/java/jscover/server/ProxyService.java b/src/main/java/jscover/server/ProxyService.java
index fffa0ea..577ba9d 100644
--- a/src/main/java/jscover/server/ProxyService.java
+++ b/src/main/java/jscover/server/ProxyService.java
@@ -469,6 +469,10 @@ public class ProxyService {
//Don't want to allow GZIP header
continue;
}
+ if (header.equalsIgnoreCase("proxy-connection")) {
+ //Should be ignored when using HTTP 1.0, but exclude anyway
+ continue;
+ }
List<String> values = clientHeaders.get(header);
for (String value : values) {
conn.addRequestProperty(header, value);
diff --git a/src/test/java/jscover/server/ProxyServiceTest.java b/src/test/java/jscover/server/ProxyServiceTest.java
index b6ead37..d86a2d3 100644
--- a/src/test/java/jscover/server/ProxyServiceTest.java
+++ b/src/test/java/jscover/server/ProxyServiceTest.java
@@ -402,7 +402,18 @@ public class ProxyServiceTest {
proxyService.copyHeadersExceptEncoding(request, conn);
- verify(conn, times(0)).addRequestProperty("Accept-Encoding", "456");
+ verify(conn, times(0)).addRequestProperty("Accept-Encoding", "GZIP");
+ }
+
+ @Test
+ public void shouldNotAddKeepAliveHeaders() {
+ headers.put("Proxy-Connection", new ArrayList<String>() {{
+ add("keep-alive");
+ }});
+
+ proxyService.copyHeadersExceptEncoding(request, conn);
+
+ verify(conn, times(0)).addRequestProperty("Proxy-Connection", "keep-alive");
}
@Test
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jscover.git
More information about the pkg-java-commits
mailing list