-
Notifications
You must be signed in to change notification settings - Fork 26.5k
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
fix: Fix the issue of HTTP calling 404 when the first letter of RPC #15292
base: 3.3
Are you sure you want to change the base?
Conversation
method name in proto is capitalized (apache#15291)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## 3.3 #15292 +/- ##
=========================================
Coverage 60.77% 60.77%
- Complexity 10920 10922 +2
=========================================
Files 1886 1886
Lines 86122 86127 +5
Branches 12902 12903 +1
=========================================
+ Hits 52337 52346 +9
+ Misses 28331 28323 -8
- Partials 5454 5458 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@@ -130,6 +130,12 @@ public void register(Invoker<?> invoker) { | |||
consumer.accept((methods) -> { | |||
Method method = methods.get(0); | |||
MethodDescriptor md = sd.getMethod(method.getName(), method.getParameterTypes()); | |||
if (md == null) { | |||
String originMethodName = method.getName(); | |||
String upperMethod = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to add a length check, otherwise the method will fail with only one letter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Add a method name length check is possible.
- After testing , when there is only one character, there will be no problem.
- I will consider resolving this issue by modifying the dubbo-compiler or DefaultRequestMappingRegistry, taking into account the comprehensive impact scope and conducting thorough testing
@@ -130,6 +130,12 @@ public void register(Invoker<?> invoker) { | |||
consumer.accept((methods) -> { | |||
Method method = methods.get(0); | |||
MethodDescriptor md = sd.getMethod(method.getName(), method.getParameterTypes()); | |||
if (md == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (md == null) { | |
if (md == null && md.getName().getLength()>1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- After testing , when there is only one character, there will be no problem.
method name in proto is capitalized (#15291)
What is the purpose of the change?
Fix the issue of HTTP calling 404 when the first letter of RPC method name in proto is capitalized (#15291)
Checklist