Skip to content

Commit 6e6f863

Browse files
committed
Polishing contribution
Closes gh-28771
1 parent 00f7f5f commit 6e6f863

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

spring-web/src/main/java/org/springframework/http/server/ServletServerHttpRequest.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@
5656
*/
5757
public class ServletServerHttpRequest implements ServerHttpRequest {
5858

59-
protected static final String FORM_CONTENT_TYPE = MediaType.APPLICATION_FORM_URLENCODED_VALUE;
60-
6159
protected static final Charset FORM_CHARSET = StandardCharsets.UTF_8;
6260

6361

@@ -231,7 +229,7 @@ public ServerHttpAsyncRequestControl getAsyncRequestControl(ServerHttpResponse r
231229

232230
private static boolean isFormPost(HttpServletRequest request) {
233231
String contentType = request.getContentType();
234-
return (contentType != null && contentType.contains(FORM_CONTENT_TYPE) &&
232+
return (contentType != null && contentType.contains(MediaType.APPLICATION_FORM_URLENCODED_VALUE) &&
235233
HttpMethod.POST.matches(request.getMethod()));
236234
}
237235

spring-web/src/main/java/org/springframework/web/util/ContentCachingRequestWrapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2021 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)