Skip to content

Commit

Permalink
Proposal to clarify in the docs that request size filter acts on Cont…
Browse files Browse the repository at this point in the history
…ent-Length header (#3085)

* Update RequestSizeGatewayFilterFactory.java

* Update GatewayFilterSpec.java
  • Loading branch information
AlexejTimonin authored Nov 3, 2023
1 parent bec2f53 commit beb688f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
import static org.springframework.cloud.gateway.support.GatewayToStringStyler.filterToStringCreator;

/**
* This filter blocks the request, if the request size is more than the permissible size.
* This filter blocks the request if the size in Content-Length header value is more than the permissible size.
* Has no effect if Content-Length header is missing.
* The default request size is 5 MB.
*
* @author Arpan
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ protected Optional<URI> determineRequestUri(ServerWebExchange exchange, Object c
}

/**
* A filter that sets the maximum permissible size of a Request.
* A filter that sets the maximum permissible size of a Content-Length header value in the Request.
* @param size the maximum size of a request
* @return a {@link GatewayFilterSpec} that can be used to apply additional filters
*/
Expand All @@ -826,7 +826,7 @@ public GatewayFilterSpec setRequestSize(Long size) {
}

/**
* A filter that sets the maximum permissible size of a Request.
* A filter that sets the maximum permissible size of a Content-Length header value in the Request.
* @param size the maximum size of a request
* @return a {@link GatewayFilterSpec} that can be used to apply additional filters
*/
Expand Down

0 comments on commit beb688f

Please sign in to comment.