~sircmpwn/kineto

9d507dcaac698254b6b0b7238c5e476a6ecdda78 — Adnan Maolood 3 years ago 44390b2
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.
3 files changed, 5 insertions(+), 6 deletions(-)

M go.mod
M go.sum
M main.go
M go.mod => go.mod +1 -1
@@ 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
)

M go.sum => go.sum +2 -2
@@ 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=

M main.go => main.go +2 -3
@@ 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"))
			}