Merge pull request #327 from iamqizhao/master
tentatively disable content-type check
This commit is contained in:
@ -141,10 +141,13 @@ func newHPACKDecoder() *hpackDecoder {
|
|||||||
d.h = hpack.NewDecoder(http2InitHeaderTableSize, func(f hpack.HeaderField) {
|
d.h = hpack.NewDecoder(http2InitHeaderTableSize, func(f hpack.HeaderField) {
|
||||||
switch f.Name {
|
switch f.Name {
|
||||||
case "content-type":
|
case "content-type":
|
||||||
|
// TODO(zhaoq): Tentatively disable the check until a bug is fixed.
|
||||||
|
/*
|
||||||
if !strings.Contains(f.Value, "application/grpc") {
|
if !strings.Contains(f.Value, "application/grpc") {
|
||||||
d.err = StreamErrorf(codes.FailedPrecondition, "transport: received the unexpected header")
|
d.err = StreamErrorf(codes.FailedPrecondition, "transport: received the unexpected header")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
case "grpc-status":
|
case "grpc-status":
|
||||||
code, err := strconv.Atoi(f.Value)
|
code, err := strconv.Atoi(f.Value)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Reference in New Issue
Block a user