Fork of go-gemini
A request to a hostname that hasn't been registered with the server currently results in a nil pointer deref panic in server.go:215 as request handling continues even if ReadRequest() returns an error. This change changes all if-else error handling in Server.respond() to a WriteStatus-call and early return. This makes it clear when request handling is aborted (and actually aborts when ReadRequest() fails). |
||
---|---|---|
examples | ||
.gitignore | ||
cert.go | ||
client.go | ||
fs.go | ||
gemini.go | ||
go.mod | ||
LICENSE | ||
mux.go | ||
query.go | ||
README.md | ||
request.go | ||
response.go | ||
server.go | ||
status.go | ||
text.go | ||
tofu.go | ||
vendor.go |
go-gemini
Package gemini implements the Gemini protocol in Go.
It aims to provide an API similar to that of net/http to make it easy to develop Gemini clients and servers.
Usage
import "git.sr.ht/~adnano/go-gemini"
Examples
There are a few examples provided in the examples directory. To run an example:
go run examples/server.go
Contributing
Send patches and questions to ~adnano/go-gemini-devel.
Subscribe to release announcements on ~adnano/go-gemini-announce.