aboutsummaryrefslogtreecommitdiff
path: root/server.go
Commit message (Collapse)AuthorAgeFilesLines
...
* Move cert.go to a subpackageAdnan Maolood2021-01-141-3/+4
|
* Simplify ResponseWriter implementationAdnan Maolood2021-01-101-108/+0
|
* Rename status.Message to status.MetaAdnan Maolood2021-01-101-8/+3
|
* Add missing error handlingHugo Wetterberg2021-01-091-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 requestsHugo Wetterberg2021-01-051-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 functionAdnan Maolood2020-12-181-1/+6
|
* Make NewResponseWriter take an io.WriterAdnan Maolood2020-12-181-3/+4
|
* Add ReadRequest and ReadResponse functionsAdnan Maolood2020-12-181-39/+14
|
* Expose Request.Write and Response.Read functionsAdnan Maolood2020-12-181-2/+3
|
* server: Don't always assume TLS is usedAdnan Maolood2020-12-181-7/+10
|
* Remove Input functionAdnan Maolood2020-12-181-20/+0
|
* Don't assume a default scheme of geminiAdnan Maolood2020-11-241-5/+0
|
* Expose KnownHosts and CertificateStore internalsAdnan Maolood2020-11-231-1/+1
|
* Add (*CertificateStore).Write functionAdnan Maolood2020-11-091-3/+4
|
* Rename (*ResponseWriter).SetMimetype to SetMediaTypeAdnan Maolood2020-11-091-8/+8
|
* Fix TOFUv0.1.7Adnan Maolood2020-11-051-1/+1
|
* Refactor KnownHostsAdnan Maolood2020-11-051-6/+7
|
* Add ErrorLog field to ServerAdnan Maolood2020-11-031-2/+17
|
* server: Populate (*Request).Certificate fieldv0.1.5Adnan Maolood2020-11-011-23/+17
|
* Refactor Certificate and Input functionsadnano2020-11-011-26/+33
|
* Update documentationv0.1.4Adnan Maolood2020-11-011-3/+3
|
* Refactor client.TrustCertificate workflowAdnan Maolood2020-10-311-1/+1
|
* Implement Server read and write timeoutsAdnan Maolood2020-10-311-0/+14
|
* Set default mimetype if META is emptyAdnan Maolood2020-10-311-14/+7
|
* Remove Redirect and PermanentRedirect functionsAdnan Maolood2020-10-311-10/+0
| | | | Use (*ResponseWriter).WriteHeader instead.
* Add ErrCertificateNotFoundAdnan Maolood2020-10-311-4/+4
|
* server: Automatically write new certificates to diskAdnan Maolood2020-10-311-14/+16
|
* Call CreateCertificate for missing certificatesAdnan Maolood2020-10-311-3/+14
|
* Fix handling of wildcard hostnamesAdnan Maolood2020-10-311-11/+12
|
* Add optional host argument in examples/client.gov0.1.3Adnan Maolood2020-10-281-1/+1
|
* Update documentationAdnan Maolood2020-10-281-1/+8
|
* Refactor server certificatesAdnan Maolood2020-10-281-222/+28
|
* Add Client.GetInput fieldAdnan Maolood2020-10-271-2/+4
|
* Add (*ResponseWriter).WriteStatus functionAdnan Maolood2020-10-271-33/+21
|
* Update documentationv0.1.0Adnan Maolood2020-10-241-1/+1
|
* Rename repository to go-geminiAdnan Maolood2020-10-241-9/+9
|
* Add Certificate helper functionAdnan Maolood2020-10-211-6/+5
|
* Refactor Input and SensitiveInput functionsAdnan Maolood2020-10-211-50/+15
|
* RefactorAdnan Maolood2020-10-211-86/+33
|
* Rename Handler to ResponderAdnan Maolood2020-10-211-103/+97
|
* Update documentationAdnan Maolood2020-10-211-5/+4
|
* Assume a default scheme of gemini://Adnan Maolood2020-10-211-1/+4
|
* Add support for wildcard hostnamesAdnan Maolood2020-10-211-18/+36
|
* Rename rw to wadnano2020-10-131-19/+19
|
* Add copyright noticeadnano2020-10-131-0/+4
|
* Rename rw, req to w, radnano2020-10-131-46/+46
|
* Move errors to gemini.goadnano2020-10-131-7/+0
|
* Update commentadnano2020-10-131-1/+0
|
* Move certificate verification code to VerifyConnectionadnano2020-10-131-4/+4
|
* examples/server: Generate new certificates when they expireadnano2020-10-131-2/+2
|