Polish
This commit is contained in:
committed by
Juergen Hoeller
parent
1c24dc1f27
commit
625e210676
@@ -1678,7 +1678,7 @@ public class HttpHeaders implements MultiValueMap<String, String>, Serializable
|
||||
|
||||
|
||||
/**
|
||||
* Return a {@code HttpHeaders} object that can only be read, not written to.
|
||||
* Return an {@code HttpHeaders} object that can only be read, not written to.
|
||||
*/
|
||||
public static HttpHeaders readOnlyHttpHeaders(HttpHeaders headers) {
|
||||
Assert.notNull(headers, "HttpHeaders must not be null");
|
||||
@@ -1691,7 +1691,7 @@ public class HttpHeaders implements MultiValueMap<String, String>, Serializable
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a {@code HttpHeaders} object that can be read and written to.
|
||||
* Return an {@code HttpHeaders} object that can be read and written to.
|
||||
* @since 5.1.1
|
||||
*/
|
||||
public static HttpHeaders writableHttpHeaders(HttpHeaders headers) {
|
||||
|
||||
@@ -301,11 +301,12 @@ public class HttpWebHandlerAdapter extends WebHandlerDecorator implements HttpHa
|
||||
}
|
||||
}
|
||||
|
||||
private boolean isDisconnectedClientError(Throwable ex) {
|
||||
private boolean isDisconnectedClientError(Throwable ex) {
|
||||
String message = NestedExceptionUtils.getMostSpecificCause(ex).getMessage();
|
||||
message = (message != null ? message.toLowerCase() : "");
|
||||
String className = ex.getClass().getSimpleName();
|
||||
return (message.contains("broken pipe") || DISCONNECTED_CLIENT_EXCEPTIONS.contains(className));
|
||||
if (message != null && message.toLowerCase().contains("broken pipe")) {
|
||||
return true;
|
||||
}
|
||||
return DISCONNECTED_CLIENT_EXCEPTIONS.contains(ex.getClass().getSimpleName());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user