Switch from github.com/bradfitz/http2 to golang.org/x/net/http2.

The latter is now the official HTTP2 package for Go.
This commit is contained in:
David Symonds 2015-09-24 18:12:31 +10:00
Родитель 326b94b90e
Коммит eb3bd654cd
5 изменённых файлов: 12 добавлений и 12 удалений

Просмотреть файл

@ -37,7 +37,7 @@ import (
"fmt"
"sync"
"github.com/bradfitz/http2"
"golang.org/x/net/http2"
)
const (

Просмотреть файл

@ -43,9 +43,9 @@ import (
"sync"
"time"
"github.com/bradfitz/http2"
"github.com/bradfitz/http2/hpack"
"golang.org/x/net/context"
"golang.org/x/net/http2"
"golang.org/x/net/http2/hpack"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/grpclog"

Просмотреть файл

@ -42,9 +42,9 @@ import (
"strconv"
"sync"
"github.com/bradfitz/http2"
"github.com/bradfitz/http2/hpack"
"golang.org/x/net/context"
"golang.org/x/net/http2"
"golang.org/x/net/http2/hpack"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/grpclog"

Просмотреть файл

@ -43,8 +43,8 @@ import (
"sync/atomic"
"time"
"github.com/bradfitz/http2"
"github.com/bradfitz/http2/hpack"
"golang.org/x/net/http2"
"golang.org/x/net/http2/hpack"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/grpclog"
"google.golang.org/grpc/metadata"
@ -143,10 +143,10 @@ func newHPACKDecoder() *hpackDecoder {
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
}
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)

Просмотреть файл

@ -44,8 +44,8 @@ import (
"testing"
"time"
"github.com/bradfitz/http2"
"golang.org/x/net/context"
"golang.org/x/net/http2"
"google.golang.org/grpc/codes"
)