spring-cloud / spring-cloud/spring-cloud-gateway
Some Route Predicates Don't Work With Regex Patterns
Open
Nobody has claimed this yet.
bug
- Dominant language
- Java
- Stars
- 4.9k
- Forks
- 3.5k
- Avg merge
- 20h 57m
- Merged PRs (30d)
- 8
Description
The cookie, header, and query route predicate factories don't match .* patterns and instead return a 404. At the very least it should return a 500, but I believe these patterns should match
spring:
cloud:
gateway:
routes:
- id: query_route
uri: https://example.org
predicates:
- Query=test, a.*b
spring:
cloud:
gateway:
routes:
- id: header_route
uri: https://example.org
predicates:
- Header=Test, a.*b
spring:
cloud:
gateway:
routes:
- id: header_route
uri: https://example.org
predicates:
- Cookie=test, a.*b
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the cookie, header, and query route predicate factories described in the issue, then reproduce the supplied a.*b patterns. Done means these predicates match the intended regex patterns instead of returning a 404; the fallback behavior should also be checked against the reported 500 expectation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring, spring-boot
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100