Skip to content

DB-4068 cherry-pick upstream HttpRequest/ObjectDecoder fixes (4.0.54/bdp 5.1) #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion all/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>io.netty</groupId>
<artifactId>netty-parent</artifactId>
<version>4.0.54.Final</version>
<version>4.0.54.1.dse</version>
</parent>

<artifactId>netty-all</artifactId>
Expand Down
33 changes: 16 additions & 17 deletions bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<groupId>io.netty</groupId>
<artifactId>netty-bom</artifactId>
<version>4.0.54.Final</version>
<version>4.0.54.1.dse</version>
<packaging>pom</packaging>

<name>Netty/BOM</name>
Expand All @@ -49,7 +49,6 @@
<url>https://github.com/netty/netty</url>
<connection>scm:git:git://github.com/netty/netty.git</connection>
<developerConnection>scm:git:ssh://[email protected]/netty/netty.git</developerConnection>
<tag>netty-4.0.54.Final</tag>
</scm>

<developers>
Expand All @@ -69,77 +68,77 @@
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-buffer</artifactId>
<version>4.0.54.Final</version>
<version>4.0.54.1.dse</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-codec</artifactId>
<version>4.0.54.Final</version>
<version>4.0.54.1.dse</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-codec-haproxy</artifactId>
<version>4.0.54.Final</version>
<version>4.0.54.1.dse</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-codec-http</artifactId>
<version>4.0.54.Final</version>
<version>4.0.54.1.dse</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-codec-socks</artifactId>
<version>4.0.54.Final</version>
<version>4.0.54.1.dse</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-common</artifactId>
<version>4.0.54.Final</version>
<version>4.0.54.1.dse</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-handler</artifactId>
<version>4.0.54.Final</version>
<version>4.0.54.1.dse</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport</artifactId>
<version>4.0.54.Final</version>
<version>4.0.54.1.dse</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-rxtx</artifactId>
<version>4.0.54.Final</version>
<version>4.0.54.1.dse</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-sctp</artifactId>
<version>4.0.54.Final</version>
<version>4.0.54.1.dse</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-udt</artifactId>
<version>4.0.54.Final</version>
<version>4.0.54.1.dse</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-example</artifactId>
<version>4.0.54.Final</version>
<version>4.0.54.1.dse</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
<version>4.0.54.Final</version>
<version>4.0.54.1.dse</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
<version>4.0.54.Final</version>
<version>4.0.54.1.dse</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
<version>4.0.54.Final</version>
<version>4.0.54.1.dse</version>
<classifier>linux-x86_64</classifier>
</dependency>
</dependencies>
Expand Down
2 changes: 1 addition & 1 deletion buffer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>io.netty</groupId>
<artifactId>netty-parent</artifactId>
<version>4.0.54.Final</version>
<version>4.0.54.1.dse</version>
</parent>

<artifactId>netty-buffer</artifactId>
Expand Down
22 changes: 22 additions & 0 deletions build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
schedules:
adhoc:
schedule: adhoc
os:
- osx/high-sierra
- ubuntu/trusty64
java:
- oraclejdk8
build:
- script: |
echo "OS VERSION ===== $OS_VERSION"
if [ "$OS_VERSION" = "osx/high-sierra" ]; then
mvn -B clean -DskipTests
mvn -B -pl transport-native-unix-common,transport-native-kqueue -Partifactory deploy -DskipTests -DaltDeploymentRepository="artifactory::default::https://repo.sjc.dsinternal.org/artifactory/datastax-releases-local"
else
export DEBIAN_FRONTEND=noninteractive
export MAVEN_HOME=/home/jenkins/.mvn/apache-maven-3.2.5
export PATH=$MAVEN_HOME/bin:$PATH
sudo apt-get update
sudo apt-get install -y autoconf automake libtool make tar gcc-multilib libaio-dev
mvn -B clean deploy -Partifactory -DskipTests -DaltDeploymentRepository="artifactory::default::https://repo.sjc.dsinternal.org/artifactory/datastax-releases-local"
fi
2 changes: 1 addition & 1 deletion codec-haproxy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>io.netty</groupId>
<artifactId>netty-parent</artifactId>
<version>4.0.54.Final</version>
<version>4.0.54.1.dse</version>
</parent>

<artifactId>netty-codec-haproxy</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion codec-http/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>io.netty</groupId>
<artifactId>netty-parent</artifactId>
<version>4.0.54.Final</version>
<version>4.0.54.1.dse</version>
</parent>

<artifactId>netty-codec-http</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -745,6 +745,11 @@ private void splitHeader(AppendableCharSequence sb) {
}
}

if (nameEnd == length) {
// There was no colon present at all.
throw new IllegalArgumentException("No colon found");
}

for (colonEnd = nameEnd; colonEnd < length; colonEnd ++) {
if (sb.charAt(colonEnd) == ':') {
colonEnd ++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,4 +262,20 @@ public void testTooLargeHeaders() {
assertTrue(request.getDecoderResult().cause() instanceof TooLongFrameException);
assertFalse(channel.finish());
}

@Test
public void testHeaderWithNoValueAndMissingColon() {
EmbeddedChannel channel = new EmbeddedChannel(new HttpRequestDecoder());
String requestStr = "GET /some/path HTTP/1.1\r\n" +
"Content-Length: 0\r\n" +
"Host:\r\n" +
"netty.io\r\n\r\n";

assertTrue(channel.writeInbound(Unpooled.copiedBuffer(requestStr, CharsetUtil.US_ASCII)));
HttpRequest request = (HttpRequest) channel.readInbound();
System.err.println(request.headers().names().toString());
assertTrue(request.getDecoderResult().isFailure());
assertTrue(request.getDecoderResult().cause() instanceof IllegalArgumentException);
assertFalse(channel.finish());
}
}
2 changes: 1 addition & 1 deletion codec-socks/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>io.netty</groupId>
<artifactId>netty-parent</artifactId>
<version>4.0.54.Final</version>
<version>4.0.54.1.dse</version>
</parent>

<artifactId>netty-codec-socks</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion codec/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>io.netty</groupId>
<artifactId>netty-parent</artifactId>
<version>4.0.54.Final</version>
<version>4.0.54.1.dse</version>
</parent>

<artifactId>netty-codec</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>io.netty</groupId>
<artifactId>netty-parent</artifactId>
<version>4.0.54.Final</version>
<version>4.0.54.1.dse</version>
</parent>

<artifactId>netty-common</artifactId>
Expand Down
3 changes: 1 addition & 2 deletions dev-tools/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<groupId>io.netty</groupId>
<artifactId>netty-dev-tools</artifactId>
<version>4.0.54.Final</version>
<version>4.0.54.1.dse</version>

<name>Netty/Dev-Tools</name>

Expand All @@ -52,6 +52,5 @@
</build>

<scm>
<tag>netty-4.0.54.Final</tag>
</scm>
</project>
2 changes: 1 addition & 1 deletion example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>io.netty</groupId>
<artifactId>netty-parent</artifactId>
<version>4.0.54.Final</version>
<version>4.0.54.1.dse</version>
</parent>

<artifactId>netty-example</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion handler/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>io.netty</groupId>
<artifactId>netty-parent</artifactId>
<version>4.0.54.Final</version>
<version>4.0.54.1.dse</version>
</parent>

<artifactId>netty-handler</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion microbench/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>io.netty</groupId>
<artifactId>netty-parent</artifactId>
<version>4.0.54.Final</version>
<version>4.0.54.1.dse</version>
</parent>

<artifactId>netty-microbench</artifactId>
Expand Down
3 changes: 1 addition & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<groupId>io.netty</groupId>
<artifactId>netty-parent</artifactId>
<packaging>pom</packaging>
<version>4.0.54.Final</version>
<version>4.0.54.1.dse</version>

<name>Netty</name>
<url>http://netty.io/</url>
Expand All @@ -53,7 +53,6 @@
<url>https://github.com/netty/netty</url>
<connection>scm:git:git://github.com/netty/netty.git</connection>
<developerConnection>scm:git:ssh://[email protected]/netty/netty.git</developerConnection>
<tag>netty-4.0.54.Final</tag>
</scm>

<developers>
Expand Down
2 changes: 1 addition & 1 deletion tarball/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>io.netty</groupId>
<artifactId>netty-parent</artifactId>
<version>4.0.54.Final</version>
<version>4.0.54.1.dse</version>
</parent>

<artifactId>netty-tarball</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion testsuite-autobahn/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>io.netty</groupId>
<artifactId>netty-parent</artifactId>
<version>4.0.54.Final</version>
<version>4.0.54.1.dse</version>
</parent>

<artifactId>netty-testsuite-autobahn</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion testsuite-osgi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>io.netty</groupId>
<artifactId>netty-parent</artifactId>
<version>4.0.54.Final</version>
<version>4.0.54.1.dse</version>
</parent>

<artifactId>netty-testsuite-osgi</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion testsuite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>io.netty</groupId>
<artifactId>netty-parent</artifactId>
<version>4.0.54.Final</version>
<version>4.0.54.1.dse</version>
</parent>

<artifactId>netty-testsuite</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion transport-native-epoll/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<parent>
<groupId>io.netty</groupId>
<artifactId>netty-parent</artifactId>
<version>4.0.54.Final</version>
<version>4.0.54.1.dse</version>
</parent>
<artifactId>netty-transport-native-epoll</artifactId>

Expand Down
2 changes: 1 addition & 1 deletion transport-rxtx/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>io.netty</groupId>
<artifactId>netty-parent</artifactId>
<version>4.0.54.Final</version>
<version>4.0.54.1.dse</version>
</parent>

<artifactId>netty-transport-rxtx</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion transport-sctp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>io.netty</groupId>
<artifactId>netty-parent</artifactId>
<version>4.0.54.Final</version>
<version>4.0.54.1.dse</version>
</parent>

<artifactId>netty-transport-sctp</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion transport-udt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>io.netty</groupId>
<artifactId>netty-parent</artifactId>
<version>4.0.54.Final</version>
<version>4.0.54.1.dse</version>
</parent>

<artifactId>netty-transport-udt</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion transport/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>io.netty</groupId>
<artifactId>netty-parent</artifactId>
<version>4.0.54.Final</version>
<version>4.0.54.1.dse</version>
</parent>

<artifactId>netty-transport</artifactId>
Expand Down