Skip to content

Documentation: clarify RegisterXXXHandlerServer compromises #1398

@joesonw

Description

@joesonw

Bug reports:

when using RegisterXXXHandlerServer rather than RegisterXXXHandlerFromEndpoint

calling grpc.SendHeader returns following error

rpc error: code = Internal desc = grpc: failed to fetch the stream from the context context.Background.WithValue(type *http.contextKey, val <not Stringer>).WithValue(type *http.contextKey, val 127.0.0.1:8081).WithCancel.WithCancel.WithCancel.WithValue(type metadata.mdIncomingKey, val <not Stringer>)

Steps you follow to reproduce the error:

register any gateway with RegisterXXXHandlerServer and try send header grpc.SendHeader in service.

What did you expect to happen instead:

causes no error

What's your theory on why it isn't working:

grpc.ServerTransportStream was not attached to context when calling service methods directly within memory

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions