Kurinji-Eswar opened a new pull request, #31197:
URL: https://github.com/apache/camel/pull/31197

   # Description
   
   Fixes [CAMEL-27906](https://issues.apache.org/jira/browse/CAMEL-27906).
   
   The `Method.parseList()` implementation did not consistently handle 
whitespace-padded single HTTP methods and empty entries in comma-separated 
method restrictions.
   
   This change improves HTTP method parsing by:
   
   - Trimming each comma-separated method entry before parsing.
   - Ignoring empty and whitespace-only entries.
   - Returning all supported HTTP methods when no valid entries remain.
   - Preserving case-insensitive method parsing.
   - Maintaining validation failures for unknown nonblank method names.
   - Preserving immutable result sets.
   
   Added `MethodTest` to cover null, empty, whitespace-only, single and 
multiple methods, blank entries, duplicates, case-insensitive parsing, invalid 
method names, and result immutability.
   
   **Verification:**
   
   Executed the focused Maven test:
   
   ```bash
   ./mvnw -pl components/camel-platform-http -am -Dtest=MethodTest 
-Dsurefire.failIfNoSpecifiedTests=false test
   ```
   
   Result: **6 tests passed, 0 failures, 0 errors.**
   
   # Target
   
   - [x] I checked that the commit is targeting the correct branch (Camel 4 
uses the `main` branch).
   
   # Tracking
   
   - [x] If this is a large change, bug fix, or code improvement, I checked 
there is a [[JIRA 
issue](https://issues.apache.org/jira/browse/CAMEL)](https://issues.apache.org/jira/browse/CAMEL)
 filed for the change (usually before you start working on it).
   
   Related issue: 
[[CAMEL-27906](https://issues.apache.org/jira/browse/CAMEL-27906)](https://issues.apache.org/jira/browse/CAMEL-27906).
   
   # Apache Camel coding standards and style
   
   - [x] I checked that each commit in the pull request has a meaningful 
subject line and body.
   
   - [ ] I have run `mvn clean install -DskipTests` locally from root folder 
and I have committed all auto-generated changes.
   
   # AI-assisted contributions
   
   - [ ] If this PR includes AI-generated code, commits have proper 
co-authorship attribution (e.g., `Co-authored-by` trailers) and the PR 
description identifies the AI tool used.


-- 
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