resteasy/resteasy-3.0.19-port-resteasy-netty-to-netty-3.10.6.patch

69 lines
4.5 KiB
Diff
Raw Normal View History

2016-12-27 10:24:06 +00:00
diff -Nru Resteasy-3.0.19.Final/jaxrs/pom.xml Resteasy-3.0.19.Final.netty3/jaxrs/pom.xml
--- Resteasy-3.0.19.Final/jaxrs/pom.xml 2016-12-27 11:13:52.980803759 +0100
+++ Resteasy-3.0.19.Final.netty3/jaxrs/pom.xml 2016-12-27 11:15:46.080178186 +0100
@@ -39,7 +39,7 @@
<dep.cdi-api.version>1.2</dep.cdi-api.version>
<dep.jboss-ejb-api_3.1_spec.version>1.0.0.Final</dep.jboss-ejb-api_3.1_spec.version>
<dep.guice.version>4.0</dep.guice.version>
- <dep.netty.version>3.6.4.Final</dep.netty.version>
+ <dep.netty.version>3.10.6.Final</dep.netty.version>
<dep.netty4.version>4.0.7.Final</dep.netty4.version>
<dep.slf4j.version>1.7.5</dep.slf4j.version>
<dep.bc.version>1.52</dep.bc.version>
diff -Nru Resteasy-3.0.19.Final/jaxrs/server-adapters/resteasy-netty/src/main/java/org/jboss/resteasy/plugins/server/netty/NettyHttpResponse.java Resteasy-3.0.19.Final.netty3/jaxrs/server-adapters/resteasy-netty/src/main/java/org/jboss/resteasy/plugins/server/netty/NettyHttpResponse.java
--- Resteasy-3.0.19.Final/jaxrs/server-adapters/resteasy-netty/src/main/java/org/jboss/resteasy/plugins/server/netty/NettyHttpResponse.java 2016-08-02 16:26:27.000000000 +0200
+++ Resteasy-3.0.19.Final.netty3/jaxrs/server-adapters/resteasy-netty/src/main/java/org/jboss/resteasy/plugins/server/netty/NettyHttpResponse.java 2016-12-27 11:14:53.477794634 +0100
@@ -119,8 +119,9 @@
if (keepAlive)
{
// Add keep alive and content length if needed
- response.addHeader(Names.CONNECTION, Values.KEEP_ALIVE);
- response.addHeader(Names.CONTENT_LENGTH, 0);
+ response.headers()
+ .add(Names.CONNECTION, Values.KEEP_ALIVE)
+ .add(Names.CONTENT_LENGTH, 0);
}
channel.write(response);
committed = true;
diff -Nru Resteasy-3.0.19.Final/jaxrs/server-adapters/resteasy-netty/src/main/java/org/jboss/resteasy/plugins/server/netty/NettyUtil.java Resteasy-3.0.19.Final.netty3/jaxrs/server-adapters/resteasy-netty/src/main/java/org/jboss/resteasy/plugins/server/netty/NettyUtil.java
--- Resteasy-3.0.19.Final/jaxrs/server-adapters/resteasy-netty/src/main/java/org/jboss/resteasy/plugins/server/netty/NettyUtil.java 2016-08-02 16:26:27.000000000 +0200
+++ Resteasy-3.0.19.Final.netty3/jaxrs/server-adapters/resteasy-netty/src/main/java/org/jboss/resteasy/plugins/server/netty/NettyUtil.java 2016-12-27 11:03:35.816979009 +0100
@@ -98,7 +98,7 @@
{
Headers<String> requestHeaders = new Headers<String>();
- for (Map.Entry<String, String> header : request.getHeaders())
+ for (Map.Entry<String, String> header : request.headers())
{
requestHeaders.add(header.getKey(), header.getValue());
}
diff -Nru Resteasy-3.0.19.Final/jaxrs/server-adapters/resteasy-netty/src/main/java/org/jboss/resteasy/plugins/server/netty/RestEasyHttpResponseEncoder.java Resteasy-3.0.19.Final.netty3/jaxrs/server-adapters/resteasy-netty/src/main/java/org/jboss/resteasy/plugins/server/netty/RestEasyHttpResponseEncoder.java
--- Resteasy-3.0.19.Final/jaxrs/server-adapters/resteasy-netty/src/main/java/org/jboss/resteasy/plugins/server/netty/RestEasyHttpResponseEncoder.java 2016-08-02 16:26:27.000000000 +0200
+++ Resteasy-3.0.19.Final.netty3/jaxrs/server-adapters/resteasy-netty/src/main/java/org/jboss/resteasy/plugins/server/netty/RestEasyHttpResponseEncoder.java 2016-12-27 11:05:34.884907810 +0100
@@ -58,11 +58,11 @@
RuntimeDelegate.HeaderDelegate delegate = dispatcher.providerFactory.getHeaderDelegate(value.getClass());
if (delegate != null)
{
- response.addHeader(key, delegate.toString(value));
+ response.headers().add(key, delegate.toString(value));
}
else
{
- response.setHeader(key, value.toString());
+ response.headers().add(key, value.toString());
}
}
}
@@ -77,8 +77,9 @@
if (nettyResponse.isKeepAlive())
{
// Add content length and connection header if needed
- response.setHeader(Names.CONTENT_LENGTH, buffer.readableBytes());
- response.setHeader(Names.CONNECTION, Values.KEEP_ALIVE);
+ response.headers()
+ .set(Names.CONTENT_LENGTH, buffer.readableBytes())
+ .set(Names.CONNECTION, Values.KEEP_ALIVE);
}
return response;
}