Skip to content

Commit

Permalink
Polishing contribution
Browse files Browse the repository at this point in the history
Closes gh-28771
  • Loading branch information
rstoyanchev committed Jul 29, 2022
1 parent 00f7f5f commit 6e6f863
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@
*/
public class ServletServerHttpRequest implements ServerHttpRequest {

protected static final String FORM_CONTENT_TYPE = MediaType.APPLICATION_FORM_URLENCODED_VALUE;

protected static final Charset FORM_CHARSET = StandardCharsets.UTF_8;


Expand Down Expand Up @@ -231,7 +229,7 @@ public ServerHttpAsyncRequestControl getAsyncRequestControl(ServerHttpResponse r

private static boolean isFormPost(HttpServletRequest request) {
String contentType = request.getContentType();
return (contentType != null && contentType.contains(FORM_CONTENT_TYPE) &&
return (contentType != null && contentType.contains(MediaType.APPLICATION_FORM_URLENCODED_VALUE) &&
HttpMethod.POST.matches(request.getMethod()));
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2021 the original author or authors.
* Copyright 2002-2022 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.
Expand Down

0 comments on commit 6e6f863

Please sign in to comment.