Update go-gemini dependency
Version 0.1.12 fixes a bug where the client Timeout was not applied when dialing, causing the client to hang when a host was down.
This commit is contained in:
parent
44390b2513
commit
9d507dcaac
3 changed files with 5 additions and 6 deletions
2
go.mod
2
go.mod
|
@ -3,6 +3,6 @@ module git.sr.ht/~sircmpwn/kineto
|
|||
go 1.15
|
||||
|
||||
require (
|
||||
git.sr.ht/~adnano/go-gemini v0.1.6
|
||||
git.sr.ht/~adnano/go-gemini v0.1.12
|
||||
git.sr.ht/~sircmpwn/getopt v0.0.0-20191230200459-23622cc906b3
|
||||
)
|
||||
|
|
4
go.sum
4
go.sum
|
@ -1,5 +1,5 @@
|
|||
git.sr.ht/~adnano/go-gemini v0.1.6 h1:nc13BMKnrHSWnR55DkaffsAe6Ik7nqwrq31Be1/0T0k=
|
||||
git.sr.ht/~adnano/go-gemini v0.1.6/go.mod h1:If1VxEWcZDrRt5FeAFnGTcM2Ud1E3BXs3VJ5rnZWKq0=
|
||||
git.sr.ht/~adnano/go-gemini v0.1.12 h1:zuNZ8ur7GO246YU1Lrl4beuSJ84A8RwmlGaNdXfbUWc=
|
||||
git.sr.ht/~adnano/go-gemini v0.1.12/go.mod h1:If1VxEWcZDrRt5FeAFnGTcM2Ud1E3BXs3VJ5rnZWKq0=
|
||||
git.sr.ht/~sircmpwn/getopt v0.0.0-20191230200459-23622cc906b3 h1:4wDp4BKF7NQqoh73VXpZsB/t1OEhDpz/zEpmdQfbjDk=
|
||||
git.sr.ht/~sircmpwn/getopt v0.0.0-20191230200459-23622cc906b3/go.mod h1:wMEGFFFNuPos7vHmWXfszqImLppbc0wEhh6JBfJIUgw=
|
||||
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
|
||||
|
|
5
main.go
5
main.go
|
@ -382,8 +382,7 @@ type GemtextHeading struct {
|
|||
func proxyGemini(req gemini.Request, external bool, root *url.URL,
|
||||
w http.ResponseWriter, r *http.Request) {
|
||||
client := gemini.Client{
|
||||
Timeout: 30 * time.Second,
|
||||
InsecureSkipTrust: true,
|
||||
Timeout: 30 * time.Second,
|
||||
}
|
||||
|
||||
if h := (url.URL{Host: req.Host}); h.Port() == "" {
|
||||
|
@ -529,7 +528,7 @@ func main() {
|
|||
w.WriteHeader(http.StatusBadRequest)
|
||||
w.Write([]byte("Bad request"))
|
||||
} else {
|
||||
w.Header().Add("Location", "?" + q[0])
|
||||
w.Header().Add("Location", "?"+q[0])
|
||||
w.WriteHeader(http.StatusFound)
|
||||
w.Write([]byte("Redirecting"))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue