Merge pull request #327 from iamqizhao/master

tentatively disable content-type check
This commit is contained in:
Qi Zhao
2015-09-02 22:27:13 -07:00

View File

@ -141,10 +141,13 @@ func newHPACKDecoder() *hpackDecoder {
d.h = hpack.NewDecoder(http2InitHeaderTableSize, func(f hpack.HeaderField) {
switch f.Name {
case "content-type":
// TODO(zhaoq): Tentatively disable the check until a bug is fixed.
/*
if !strings.Contains(f.Value, "application/grpc") {
d.err = StreamErrorf(codes.FailedPrecondition, "transport: received the unexpected header")
return
}
*/
case "grpc-status":
code, err := strconv.Atoi(f.Value)
if err != nil {