Consistent HttpMethod identity comparisons
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 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.
|
||||
@@ -61,7 +61,6 @@ public class HttpHandlerConnector implements ClientHttpConnector {
|
||||
|
||||
private static Log logger = LogFactory.getLog(HttpHandlerConnector.class);
|
||||
|
||||
|
||||
private final HttpHandler handler;
|
||||
|
||||
|
||||
@@ -118,8 +117,7 @@ public class HttpHandlerConnector implements ClientHttpConnector {
|
||||
}
|
||||
|
||||
private ServerHttpResponse prepareResponse(ServerHttpResponse response, ServerHttpRequest request) {
|
||||
return HttpMethod.HEAD.equals(request.getMethod()) ?
|
||||
new HttpHeadResponseDecorator(response) : response;
|
||||
return (request.getMethod() == HttpMethod.HEAD ? new HttpHeadResponseDecorator(response) : response);
|
||||
}
|
||||
|
||||
private ClientHttpResponse adaptResponse(MockServerHttpResponse response, Flux<DataBuffer> body) {
|
||||
|
||||
Reference in New Issue
Block a user