mirror of
https://github.com/caddyserver/caddy.git
synced 2026-08-27 04:07:28 +00:00
vendor: Updated quic-go for QUIC 39+ (#1968)
* Updated lucas-clemente/quic-go for QUIC 39+ support * Update quic-go to latest
This commit is contained in:
parent
faa5248d1f
commit
1201492222
229 changed files with 26903 additions and 4254 deletions
42
vendor/github.com/bifurcation/mint/bin/mint-client-https/main.go
generated
vendored
Normal file
42
vendor/github.com/bifurcation/mint/bin/mint-client-https/main.go
generated
vendored
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"net"
|
||||
"net/http"
|
||||
"os"
|
||||
|
||||
"github.com/bifurcation/mint"
|
||||
)
|
||||
|
||||
var url string
|
||||
|
||||
func main() {
|
||||
url := flag.String("url", "https://localhost:4430", "URL to send request")
|
||||
flag.Parse()
|
||||
mintdial := func(network, addr string) (net.Conn, error) {
|
||||
return mint.Dial(network, addr, nil)
|
||||
}
|
||||
|
||||
tr := &http.Transport{
|
||||
DialTLS: mintdial,
|
||||
DisableCompression: true,
|
||||
}
|
||||
client := &http.Client{Transport: tr}
|
||||
|
||||
response, err := client.Get(*url)
|
||||
if err != nil {
|
||||
fmt.Println("err:", err)
|
||||
return
|
||||
}
|
||||
defer response.Body.Close()
|
||||
|
||||
contents, err := ioutil.ReadAll(response.Body)
|
||||
if err != nil {
|
||||
fmt.Printf("%s", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
fmt.Printf("%s\n", string(contents))
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue