-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
config service(version 2.0.0-RC1 or above) return 404 when use double slash "//" in http path #4947
Comments
Just add a property in config service's .properties file spring.mvc.pathmatch.matching-strategy=ant-path-matcher Everything is great again! Reference:
|
The release notes for Spring Boot 2.6 include a section titled PathPattern Based Path Matching Strategy for Spring MVC. This particular change seems to have escaped my attention when issue #4295 was raised. To maintain the original logic, should we set the following configuration as the default?
|
This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions. |
This issue has been automatically closed because it has not had activity in the last 7 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted". Thank you for your contributions. |
Describe the bug
apollo client read config fail when there is a slash in the suffix of apollo.meta, for example
but it work well when
/
doesn't occur in the suffix. i.eReproduce
run
to access config service, version 2.0.0-RC1
get
watch out that
//
after port 8080Expected behavior
get json like
Additional Details & Logs
$ java -version openjdk version "1.8.0_362" OpenJDK Runtime Environment (build 1.8.0_362-8u372-ga~us1-0ubuntu1~20.04-b09) OpenJDK 64-Bit Server VM (build 25.362-b09, mixed mode)
more detail from version 1.8.2 to 2.0.1
1.8.2
curl http://localhost:8080/services/config
curl http://localhost:8080//services/config
1.9.2
curl http://localhost:8080/services/config
curl http://localhost:8080//services/config
2.0.0-RC1
curl http://localhost:8080/services/config
curl http://localhost:8080//services/config
2.0.1
curl http://localhost:8080/services/config
curl http://localhost:8080//services/config
trouble shoot
apollo-client
https://github.com/apolloconfig/apollo-java/blob/265fe49ddf0a4becad40ecf5bcd6bd1c86d9826b/apollo-client/src/main/java/com/ctrip/framework/apollo/internals/ConfigServiceLocator.java#L248C26-L248C35
when domainName(apollo.meta) is
http://ip:port/
will get double slash//
inhttp://ip:port//services/config?...
config-service
The path mapping in
apollo/apollo-configservice/src/main/java/com/ctrip/framework/apollo/metaservice/controller/ServiceController.java
Line 48 in 99b76dc
Guess that when Spring MVC or Spring WebFlux update in #4295 cause it?
I.e '//' cannot access again.
solution:
The text was updated successfully, but these errors were encountered: