hqbhonker opened a new pull request, #6378:
URL: https://github.com/apache/shenyu/pull/6378

   ## Description
   
   This PR adds support for configuring the HTTP request decoder properties in 
ShenYu Gateway, resolving the issue where HTTP requests with long URLs 
(exceeding 4096 bytes) are rejected.
   
   ## Changes
   
   ### shenyu-common
   - Added `HttpDecoderProperties` inner class to `NettyHttpProperties` with:
     - `maxInitialLineLength` (default: 4096)
     - `maxHeaderSize` (default: 8192)
     - `maxChunkSize` (default: 8192)
   
   ### shenyu-spring-boot-starter-gateway
   - Modified `ShenyuNettyWebServerConfiguration` to apply httpRequestDecoder 
settings from configuration
   - Added test case for the new httpDecoder properties
   
   ### shenyu-bootstrap
   - Added example configuration in `application.yml`
   
   ## Configuration Example
   
   ```yaml
   shenyu:
     netty:
       http:
         httpDecoder:
           maxInitialLineLength: 8192
           maxHeaderSize: 16384
           maxChunkSize: 16384
   ```
   
   ## How to Test
   
   1. Configure `shenyu.netty.http.httpDecoder.maxInitialLineLength=8192` in 
application.yml
   2. Send an HTTP request with a URL longer than 4096 bytes
   3. The request should be processed successfully instead of being rejected
   
   ## Checklist
   
   - [x] Code follows the project's coding style
   - [x] Unit tests added
   - [x] Configuration example updated
   - [x] Backward compatible (uses Netty default values when not configured)
   
   Closes #5856


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to