From d303ac94dc5028cc069dd5d07c784339094cc859 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Mon, 11 Apr 2016 12:22:37 +0200 Subject: [PATCH] Polishing --- .../http/client/Netty4ClientHttpRequest.java | 10 +++++----- .../http/client/Netty4ClientHttpResponse.java | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/spring-web/src/main/java/org/springframework/http/client/Netty4ClientHttpRequest.java b/spring-web/src/main/java/org/springframework/http/client/Netty4ClientHttpRequest.java index 961255a4b72..929cfb62b8d 100644 --- a/spring-web/src/main/java/org/springframework/http/client/Netty4ClientHttpRequest.java +++ b/spring-web/src/main/java/org/springframework/http/client/Netty4ClientHttpRequest.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2015 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,8 +42,8 @@ import org.springframework.util.concurrent.ListenableFuture; import org.springframework.util.concurrent.SettableListenableFuture; /** - * {@link org.springframework.http.client.ClientHttpRequest} implementation that uses - * Netty 4 to execute requests. + * {@link org.springframework.http.client.ClientHttpRequest} implementation + * that uses Netty 4 to execute requests. * *

Created via the {@link Netty4ClientHttpRequestFactory}. * @@ -148,8 +148,8 @@ class Netty4ClientHttpRequest extends AbstractAsyncClientHttpRequest implements FullHttpRequest nettyRequest = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, nettyMethod, this.uri.toString(), this.body.buffer()); - nettyRequest.headers().set(HttpHeaders.HOST, uri.getHost()); - nettyRequest.headers().set(HttpHeaders.CONNECTION, io.netty.handler.codec.http.HttpHeaders.Values.CLOSE); + nettyRequest.headers().set(HttpHeaders.HOST, this.uri.getHost()); + nettyRequest.headers().set(HttpHeaders.CONNECTION, "close"); for (Map.Entry> entry : headers.entrySet()) { nettyRequest.headers().add(entry.getKey(), entry.getValue()); diff --git a/spring-web/src/main/java/org/springframework/http/client/Netty4ClientHttpResponse.java b/spring-web/src/main/java/org/springframework/http/client/Netty4ClientHttpResponse.java index 0963d254088..be619f1f8f5 100644 --- a/spring-web/src/main/java/org/springframework/http/client/Netty4ClientHttpResponse.java +++ b/spring-web/src/main/java/org/springframework/http/client/Netty4ClientHttpResponse.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -28,8 +28,8 @@ import org.springframework.http.HttpHeaders; import org.springframework.util.Assert; /** - * {@link org.springframework.http.client.ClientHttpResponse} implementation that uses - * Netty 4 to execute requests. + * {@link org.springframework.http.client.ClientHttpResponse} implementation + * that uses Netty 4 to parse responses. * * @author Arjen Poutsma * @since 4.1.2