Skip to content
This repository has been archived by the owner on Feb 9, 2022. It is now read-only.

Commit

Permalink
upgrade http connections to http/2 if possible
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Rubin committed Oct 10, 2016
1 parent ff1fdfe commit 8375cc0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION := 0.1.2
VERSION := 0.1.3
BUILD_DEPS := github.com/tcnksm/ghr
DIST_OS := linux darwin openbsd
DIST_ARCH := amd64 386
Expand Down
6 changes: 6 additions & 0 deletions dnsserver/https_lookup.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import (
"net/url"
"time"

"golang.org/x/net/http2"

"github.com/certifi/gocertifi"
"github.com/miekg/dns"
"github.com/pkg/errors"
Expand Down Expand Up @@ -123,6 +125,10 @@ func (d *DNSServer) initHTTPTransport(addr string) error {
},
}

if err = http2.ConfigureTransport(&httpTransport); err != nil {
return err
}

t := transport{
transport: &httpTransport,
}
Expand Down

0 comments on commit 8375cc0

Please sign in to comment.