You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When there is no package in the proto file, an unnecessary "." is added to the Path of the HTTP Handler. ServeHTTP will not be called because the path used in the branch and the path used in the implementation are generated differently.
For the PingServiceName = "PingService" constant, the NewPingServiceHandler method will result in "/.PingService/".
Comment
service.Desc.ParentFile().Package() is empty string and . + service.Desc.Name().
I think this bug occurs because this reflectionName and service.Desc.FullName() do not match.
Use the protobuf runtime's `FullName` rather than our own, bug-prone
implementation.
Fixes#597.
---------
Co-authored-by: Akshay Shah <[email protected]>
Describe the bug
When there is no package in the proto file, an unnecessary "." is added to the Path of the HTTP Handler.
ServeHTTP
will not be called because the path used in the branch and the path used in the implementation are generated differently.To reproduce
Reproducible with this branch.
PingServiceName = "PingService"
constant, theNewPingServiceHandler
method will result in"/.PingService/"
.Comment
service.Desc.ParentFile().Package()
is empty string and.
+service.Desc.Name()
.I think this bug occurs because this
reflectionName
andservice.Desc.FullName()
do not match.connect-go/cmd/protoc-gen-connect-go/main.go
Line 514 in 065b6ad
This text was translated from Japanese by DeepL.
Original text
バグの説明
protoファイルにpackageがない場合、HTTP HandlerのPathに不要な"."が付与される。
分岐で使用するパスと、実装で使うパスが異なって生成されるため
ServeHTTP
が呼ばれなくなってしまう。再現方法
このブランチで再現可能。
PingServiceName = "PingService"
定数に対して、NewPingServiceHandler
メソッドでは"/.PingService/"
になっている。コメント
service.Desc.ParentFile().Package()
が空文字列になり、.
+service.Desc.Name()
となってしまう。この
reflectionName
とservice.Desc.FullName()
が一致しないため、このバグが発生していると思います。connect-go/cmd/protoc-gen-connect-go/main.go
Line 514 in 065b6ad
この文章は日本語をDeepLで翻訳した。
The text was updated successfully, but these errors were encountered: