aboutsummaryrefslogtreecommitdiff
path: root/client.go
Commit message (Collapse)AuthorAgeFilesLines
* client: Only get cert if TrustCertificate is setAdnan Maolood2021-03-201-1/+1
|
* client: Close connection on errorAdnan Maolood2021-03-201-0/+3
|
* client: Remove hostname verification checkAdnan Maolood2021-03-041-4/+0
|
* client: Ignore certificate expiration timeAdnan Maolood2021-03-041-5/+0
|
* Make Request implement io.WriterToAdnan Maolood2021-02-281-1/+1
|
* client: Fix copying of requestAdnan Maolood2021-02-241-3/+4
|
* Move I/O utilities to io.goAdnan Maolood2021-02-231-53/+0
|
* client: Clarify usage of contextsAdnan Maolood2021-02-231-6/+6
|
* Update documentationAdnan Maolood2021-02-231-8/+6
|
* response: Add Conn and TLS methodsAdnan Maolood2021-02-231-0/+1
|
* client: Move context handling to doAdnan Maolood2021-02-231-17/+17
|
* client: Cancel context on IO errorsAdnan Maolood2021-02-231-4/+72
| | | | Also close the connection when the context expires.
* response: Remove TLS fieldAdnan Maolood2021-02-231-6/+0
|
* client: Use present tense in documentationAdnan Maolood2021-02-231-2/+2
|
* client: Document use of contextsAdnan Maolood2021-02-221-2/+5
|
* client: Remove TimeoutAdnan Maolood2021-02-211-17/+1
| | | | Clients should use context.WithTimeout instead.
* Move punycode functions to client.goAdnan Maolood2021-02-211-0/+23
|
* client: Copy only what is needed from the RequestAdnan Maolood2021-02-211-9/+10
|
* Add ErrCertificateExpiredAdnan Maolood2021-02-211-2/+1
|
* client: Inline result typeAdnan Maolood2021-02-211-10/+11
|
* client: Make Get and Do accept a ContextAdnan Maolood2021-02-201-77/+90
| | | | This removes the need for Request.Context.
* client: Allow Request.Host to omit a portAdnan Maolood2021-02-201-2/+3
|
* request.Write: Accept an io.WriterAdnan Maolood2021-02-181-4/+1
|
* client: Remove superfluous call to FlushAdnan Maolood2021-02-181-4/+0
|
* client: Don't try to verify unicode hostnamev0.1.14Adnan Maolood2021-02-161-4/+2
|
* Make Request.Host optionalAdnan Maolood2021-02-141-14/+28
|
* Update Client documentationAdnan Maolood2021-02-141-2/+19
|
* Update documentationAdnan Maolood2021-02-141-2/+2
|
* client: Punycode request URLAdnan Maolood2021-02-091-1/+15
|
* client: Support IDNsAdnan Maolood2021-02-091-19/+18
| | | | Convert IDNs to punycode before performing DNS lookups.
* Make TLS field nil for unencrypted connectionsAdnan Maolood2021-02-081-1/+2
|
* tofu: Implement PersistentHostsAdnan Maolood2021-01-251-6/+3
|
* client: Add note about TOFUAdnan Maolood2021-01-141-0/+3
|
* fs: Update commentsAdnan Maolood2021-01-141-1/+0
|
* client: set the client timout on the dialer, close connection on errHugo Wetterberg2021-01-131-5/+28
| | | | | | | | | | Client.Timout isn't respected for the dial. Requests will hang on dial until OS-level timouts kick in unless there is a Request.Context with a deadline. We also fail to close the connection on errors. This change sets the client timeout as the dialer timeout so that it will be respected. It also ensures that we close the connection if we fail to make the request.
* Add missing error handlingHugo Wetterberg2021-01-091-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* client: Verify expiration timeAdnan Maolood2020-12-191-0/+5
|
* Add ReadRequest and ReadResponse functionsAdnan Maolood2020-12-181-2/+2
|
* Expose Request.Write and Response.Read functionsAdnan Maolood2020-12-181-2/+2
|
* Remove unnecessary variableAdnan Maolood2020-12-181-2/+2
|
* Remove Response.Request fieldAdnan Maolood2020-12-181-1/+0
|
* client: Remove GetInput and CheckRedirect callbacksAdnan Maolood2020-12-181-52/+1
|
* Update switch statementAdnan Maolood2020-12-171-3/+3
|
* client: Remove GetCertificate callbackAdnan Maolood2020-12-171-25/+0
|
* Update GetCertificate documentationAdnan Maolood2020-12-171-1/+3
|
* Decouple Client from KnownHostsFileAdnan Maolood2020-12-171-84/+48
|
* Allow Request.Context to be nilAdnan Maolood2020-12-171-1/+7
|
* client: Add GetCertificate callbackAdnan Maolood2020-12-171-46/+9
|
* Revert to using hexadecimal to encode fingerprintsv0.1.9Adnan Maolood2020-12-161-2/+1
|
* Fix escaping of queriesAdnan Maolood2020-11-271-1/+1
|