| Commit message (Collapse) | Author | Age | Files | Lines | ||
|---|---|---|---|---|---|---|
| ... | ||||||
| * | Move cert.go to a subpackage | Adnan Maolood | 2021-01-14 | 1 | -3/+4 | |
| | | ||||||
| * | Simplify ResponseWriter implementation | Adnan Maolood | 2021-01-10 | 1 | -108/+0 | |
| | | ||||||
| * | Rename status.Message to status.Meta | Adnan Maolood | 2021-01-10 | 1 | -8/+3 | |
| | | ||||||
| * | Add missing error handling | Hugo Wetterberg | 2021-01-09 | 1 | -29/+65 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. | |||||
| * | server: abort request handling on bad requests | Hugo Wetterberg | 2021-01-05 | 1 | -14/+16 | |
| | | | | | | | | | | | 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). | |||||
| * | Add ResponseWriter.Flush function | Adnan Maolood | 2020-12-18 | 1 | -1/+6 | |
| | | ||||||
| * | Make NewResponseWriter take an io.Writer | Adnan Maolood | 2020-12-18 | 1 | -3/+4 | |
| | | ||||||
| * | Add ReadRequest and ReadResponse functions | Adnan Maolood | 2020-12-18 | 1 | -39/+14 | |
| | | ||||||
| * | Expose Request.Write and Response.Read functions | Adnan Maolood | 2020-12-18 | 1 | -2/+3 | |
| | | ||||||
| * | server: Don't always assume TLS is used | Adnan Maolood | 2020-12-18 | 1 | -7/+10 | |
| | | ||||||
| * | Remove Input function | Adnan Maolood | 2020-12-18 | 1 | -20/+0 | |
| | | ||||||
| * | Don't assume a default scheme of gemini | Adnan Maolood | 2020-11-24 | 1 | -5/+0 | |
| | | ||||||
| * | Expose KnownHosts and CertificateStore internals | Adnan Maolood | 2020-11-23 | 1 | -1/+1 | |
| | | ||||||
| * | Add (*CertificateStore).Write function | Adnan Maolood | 2020-11-09 | 1 | -3/+4 | |
| | | ||||||
| * | Rename (*ResponseWriter).SetMimetype to SetMediaType | Adnan Maolood | 2020-11-09 | 1 | -8/+8 | |
| | | ||||||
| * | Fix TOFUv0.1.7 | Adnan Maolood | 2020-11-05 | 1 | -1/+1 | |
| | | ||||||
| * | Refactor KnownHosts | Adnan Maolood | 2020-11-05 | 1 | -6/+7 | |
| | | ||||||
| * | Add ErrorLog field to Server | Adnan Maolood | 2020-11-03 | 1 | -2/+17 | |
| | | ||||||
| * | server: Populate (*Request).Certificate fieldv0.1.5 | Adnan Maolood | 2020-11-01 | 1 | -23/+17 | |
| | | ||||||
| * | Refactor Certificate and Input functions | adnano | 2020-11-01 | 1 | -26/+33 | |
| | | ||||||
| * | Update documentationv0.1.4 | Adnan Maolood | 2020-11-01 | 1 | -3/+3 | |
| | | ||||||
| * | Refactor client.TrustCertificate workflow | Adnan Maolood | 2020-10-31 | 1 | -1/+1 | |
| | | ||||||
| * | Implement Server read and write timeouts | Adnan Maolood | 2020-10-31 | 1 | -0/+14 | |
| | | ||||||
| * | Set default mimetype if META is empty | Adnan Maolood | 2020-10-31 | 1 | -14/+7 | |
| | | ||||||
| * | Remove Redirect and PermanentRedirect functions | Adnan Maolood | 2020-10-31 | 1 | -10/+0 | |
| | | | | | Use (*ResponseWriter).WriteHeader instead. | |||||
| * | Add ErrCertificateNotFound | Adnan Maolood | 2020-10-31 | 1 | -4/+4 | |
| | | ||||||
| * | server: Automatically write new certificates to disk | Adnan Maolood | 2020-10-31 | 1 | -14/+16 | |
| | | ||||||
| * | Call CreateCertificate for missing certificates | Adnan Maolood | 2020-10-31 | 1 | -3/+14 | |
| | | ||||||
| * | Fix handling of wildcard hostnames | Adnan Maolood | 2020-10-31 | 1 | -11/+12 | |
| | | ||||||
| * | Add optional host argument in examples/client.gov0.1.3 | Adnan Maolood | 2020-10-28 | 1 | -1/+1 | |
| | | ||||||
| * | Update documentation | Adnan Maolood | 2020-10-28 | 1 | -1/+8 | |
| | | ||||||
| * | Refactor server certificates | Adnan Maolood | 2020-10-28 | 1 | -222/+28 | |
| | | ||||||
| * | Add Client.GetInput field | Adnan Maolood | 2020-10-27 | 1 | -2/+4 | |
| | | ||||||
| * | Add (*ResponseWriter).WriteStatus function | Adnan Maolood | 2020-10-27 | 1 | -33/+21 | |
| | | ||||||
| * | Update documentationv0.1.0 | Adnan Maolood | 2020-10-24 | 1 | -1/+1 | |
| | | ||||||
| * | Rename repository to go-gemini | Adnan Maolood | 2020-10-24 | 1 | -9/+9 | |
| | | ||||||
| * | Add Certificate helper function | Adnan Maolood | 2020-10-21 | 1 | -6/+5 | |
| | | ||||||
| * | Refactor Input and SensitiveInput functions | Adnan Maolood | 2020-10-21 | 1 | -50/+15 | |
| | | ||||||
| * | Refactor | Adnan Maolood | 2020-10-21 | 1 | -86/+33 | |
| | | ||||||
| * | Rename Handler to Responder | Adnan Maolood | 2020-10-21 | 1 | -103/+97 | |
| | | ||||||
| * | Update documentation | Adnan Maolood | 2020-10-21 | 1 | -5/+4 | |
| | | ||||||
| * | Assume a default scheme of gemini:// | Adnan Maolood | 2020-10-21 | 1 | -1/+4 | |
| | | ||||||
| * | Add support for wildcard hostnames | Adnan Maolood | 2020-10-21 | 1 | -18/+36 | |
| | | ||||||
| * | Rename rw to w | adnano | 2020-10-13 | 1 | -19/+19 | |
| | | ||||||
| * | Add copyright notice | adnano | 2020-10-13 | 1 | -0/+4 | |
| | | ||||||
| * | Rename rw, req to w, r | adnano | 2020-10-13 | 1 | -46/+46 | |
| | | ||||||
| * | Move errors to gemini.go | adnano | 2020-10-13 | 1 | -7/+0 | |
| | | ||||||
| * | Update comment | adnano | 2020-10-13 | 1 | -1/+0 | |
| | | ||||||
| * | Move certificate verification code to VerifyConnection | adnano | 2020-10-13 | 1 | -4/+4 | |
| | | ||||||
| * | examples/server: Generate new certificates when they expire | adnano | 2020-10-13 | 1 | -2/+2 | |
| | | ||||||