| Commit message (Collapse) | Author | Age | Files | Lines | |
|---|---|---|---|---|---|
| * | fs: Avoid equality check if lengths don't matchv0.2.1 | Adnan Maolood | 2021-04-21 | 1 | -1/+1 |
| | | |||||
| * | fs: Improve redirect behavior | Adnan Maolood | 2021-04-21 | 1 | -12/+17 |
| | | |||||
| * | fs: Refactor | Adnan Maolood | 2021-04-21 | 1 | -76/+57 |
| | | |||||
| * | fs: Remove ServeContent function | Adnan Maolood | 2021-04-21 | 1 | -19/+5 |
| | | |||||
| * | fs: Fix panic on indexing URL of zero length | Adnan Maolood | 2021-04-21 | 1 | -3/+3 |
| | | |||||
| * | Revert "Require Go 1.16"v0.2.0-rc.2 | Adnan Maolood | 2021-03-23 | 1 | -0/+2 |
| | | | | | This reverts commit 0e87d64ffc2512563926d15cea6806f47205f7f9. | ||||
| * | fs: Fix empty media type for directory index pages | Adnan Maolood | 2021-03-20 | 1 | -1/+2 |
| | | |||||
| * | Require Go 1.16 | Adnan Maolood | 2021-02-28 | 1 | -2/+0 |
| | | |||||
| * | Don't require Go 1.16 | Adnan Maolood | 2021-02-24 | 1 | -0/+2 |
| | | |||||
| * | Move mimetype registration to gemini.go | Adnan Maolood | 2021-02-24 | 1 | -6/+0 |
| | | |||||
| * | fs: Remove build constraintv0.1.15 | Adnan Maolood | 2021-02-24 | 1 | -2/+0 |
| | | |||||
| * | fs: Fix Go build constraint comment | Adnan Maolood | 2021-02-24 | 1 | -1/+1 |
| | | |||||
| * | Only use fs.go when fs.FS is available | Kaleb Elwert | 2021-02-24 | 1 | -0/+2 |
| | | |||||
| * | Make ResponseWriter an interface | Adnan Maolood | 2021-02-24 | 1 | -6/+6 |
| | | | | | | | | Make ResponseWriter an interface with an unexported method. Implementors must embed a ResponseWriter from elsewhere. This gives us the flexibility of an interface while allowing us to add new methods in the future. | ||||
| * | Make ResponseWriter a struct | Adnan Maolood | 2021-02-23 | 1 | -6/+6 |
| | | | | | | Make ResponseWriter a struct again so that it can be extended in a backwards-compatible way. | ||||
| * | Update documentation | Adnan Maolood | 2021-02-23 | 1 | -3/+3 |
| | | |||||
| * | Rename ResponseWriter.MediaType to SetMediaType | Adnan Maolood | 2021-02-21 | 1 | -1/+1 |
| | | |||||
| * | fs: Use better error messages | Adnan Maolood | 2021-02-21 | 1 | -2/+13 |
| | | |||||
| * | fs: Remove unused context arguments | Adnan Maolood | 2021-02-21 | 1 | -8/+8 |
| | | |||||
| * | handler: Make ServeGemini accept a Context | Adnan Maolood | 2021-02-20 | 1 | -9/+10 |
| | | |||||
| * | Redesign ResponseWriter interface | Adnan Maolood | 2021-02-17 | 1 | -9/+9 |
| | | |||||
| * | fs: Reject potentially unsafe requests in ServeFile | Adnan Maolood | 2021-02-17 | 1 | -0/+36 |
| | | | | | | | Reject requests where r.URL.Path contains a ".." path element to protect against callers who might unsafely use filepath.Join on r.URL.Path without sanitizing it. | ||||
| * | fs: Add ServeContent function | Adnan Maolood | 2021-02-17 | 1 | -5/+19 |
| | | |||||
| * | fs: Fix redirect to canonical file path | Adnan Maolood | 2021-02-17 | 1 | -1/+1 |
| | | |||||
| * | fs: Add redirects | Adnan Maolood | 2021-02-17 | 1 | -4/+41 |
| | | |||||
| * | fs: Trim trailing slash from name in ServeFile | Adnan Maolood | 2021-02-17 | 1 | -1/+1 |
| | | |||||
| * | fs: Clean paths before handling with FileServer | Adnan Maolood | 2021-02-17 | 1 | -1/+1 |
| | | |||||
| * | fs: Show listing for directories without index files | Adnan Maolood | 2021-02-17 | 1 | -30/+57 |
| | | |||||
| * | fs: Remove leading slash before opening files | Adnan Maolood | 2021-02-16 | 1 | -0/+6 |
| | | |||||
| * | fs: Replace FileSystem with io/fs.FS | Adnan Maolood | 2021-02-16 | 1 | -50/+8 |
| | | |||||
| * | fs: Refactor | Adnan Maolood | 2021-02-14 | 1 | -55/+77 |
| | | |||||
| * | fs: Update documentation | Adnan Maolood | 2021-02-14 | 1 | -12/+2 |
| | | |||||
| * | Make ResponseWriter an interface | Adnan Maolood | 2021-02-09 | 1 | -2/+2 |
| | | |||||
| * | Rename Responder to Handler | Adnan Maolood | 2021-02-08 | 1 | -4/+5 |
| | | |||||
| * | fs: Remove unused importv0.1.12 | Adnan Maolood | 2021-01-14 | 1 | -1/+0 |
| | | |||||
| * | fs: Update comments | Adnan Maolood | 2021-01-14 | 1 | -2/+2 |
| | | |||||
| * | fs: Don't panic on mime.AddExtensionType error | Adnan Maolood | 2021-01-14 | 1 | -7/+2 |
| | | | | | It's probably best not to panic if this fails. | ||||
| * | fs: Update comments | Adnan Maolood | 2021-01-14 | 1 | -2/+11 |
| | | |||||
| * | Simplify ResponseWriter implementation | Adnan Maolood | 2021-01-10 | 1 | -2/+2 |
| | | |||||
| * | Add missing error handling | Hugo Wetterberg | 2021-01-09 | 1 | -6/+12 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Error handling is currently missing is a couple of places. Most of them are i/o related. This change adds checks, an therefore sometimes also has to change function signatures by adding an error return value. In the case of the response writer the status and meta handling is changed and this also breaks the API. In some places where we don't have any reasonable I've added assignment to a blank identifier to make it clear that we're ignoring an error. text: read the Err() that can be set by the scanner. client: check if conn.SetDeadline() returns an error. client: check if req.Write() returns an error. fs: panic if mime type registration fails. server: stop performing i/o in Header/Status functions By deferring the actual header write to the first Write() or Flush() call we don't have to do any error handling in Header() or Status(). As Server.respond() now defers a ResponseWriter.Flush() instead of directly flushing the underlying bufio.Writer this has the added benefit of ensuring that we always write a header to the client, even if the responder is a complete NOOP. tofu: return an error if we fail to write to the known hosts writer. | ||||
| * | Rename (*ResponseWriter).SetMimetype to SetMediaType | Adnan Maolood | 2020-11-09 | 1 | -2/+2 |
| | | |||||
| * | Remove some unnecessary errors | Adnan Maolood | 2020-11-04 | 1 | -2/+2 |
| | | |||||
| * | Use strings.Builder in Fingerprint | Adnan Maolood | 2020-10-28 | 1 | -5/+4 |
| | | |||||
| * | Add ServeFile functionv0.1.2 | Adnan Maolood | 2020-10-27 | 1 | -0/+21 |
| | | |||||
| * | Add (*ResponseWriter).WriteStatus function | Adnan Maolood | 2020-10-27 | 1 | -1/+1 |
| | | |||||
| * | Update documentationv0.1.0 | Adnan Maolood | 2020-10-24 | 1 | -2/+2 |
| | | |||||
| * | Rename repository to go-gemini | Adnan Maolood | 2020-10-24 | 1 | -1/+1 |
| | | |||||
| * | Rename Handler to Responder | Adnan Maolood | 2020-10-21 | 1 | -2/+2 |
| | | |||||
| * | Rename rw, req to w, r | adnano | 2020-10-13 | 1 | -5/+5 |
| | | |||||
| * | Move errors to gemini.go | adnano | 2020-10-13 | 1 | -6/+0 |
| | | |||||