diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 570ca7f1..ea3271bc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -65,7 +65,8 @@ Don't worry, that won't happen without an open discussion first. If you are going to spend significant time writing code for a new pull request, best to open an issue to "claim" it and get feedback before you invest a lot of -time. +time. Not all pull requests are merged, and that's okay. +[Read why.](https://github.com/turbolinks/turbolinks/pull/124#issuecomment-239826060) Remember: pull requests should always be thoroughly documented both via godoc and with at least a rough draft of documentation that might go on the website diff --git a/README.md b/README.md index 2c5d41cf..38e432d7 100644 --- a/README.md +++ b/README.md @@ -99,7 +99,7 @@ Note: You will need **[Go 1.6](https://golang.org/dl/)** or newer. 1. `go get github.com/mholt/caddy/caddy` 2. `cd` into your website's directory -3. Run `caddy` (assumes `$GOPATH/bin` is in your `$PATH`) +3. Run `caddy` (assuming `$GOPATH/bin` is in your `$PATH`) Caddy's `main()` is in the caddy subfolder. To recompile Caddy, use `build.bash` found in that folder. diff --git a/caddyhttp/redirect/setup.go b/caddyhttp/redirect/setup.go index 1a97ffef..da797ab0 100644 --- a/caddyhttp/redirect/setup.go +++ b/caddyhttp/redirect/setup.go @@ -165,5 +165,5 @@ var httpRedirs = map[string]int{ "304": http.StatusNotModified, "305": http.StatusUseProxy, "307": http.StatusTemporaryRedirect, - "308": 308, // Permanent Redirect + "308": 308, // Permanent Redirect (RFC 7238) } diff --git a/caddytls/config.go b/caddytls/config.go index cef90aa3..f0f234b6 100644 --- a/caddytls/config.go +++ b/caddytls/config.go @@ -130,6 +130,9 @@ func (c *Config) ObtainCert(allowPrompts bool) error { return c.obtainCertName(c.Hostname, allowPrompts) } +// obtainCertName gets a certificate for name using the ACME config c +// if c and name both qualify. It places the certificate in storage. +// It is a no-op if the storage already has a certificate for name. func (c *Config) obtainCertName(name string, allowPrompts bool) error { if !c.Managed || !HostQualifies(name) { return nil diff --git a/caddytls/crypto.go b/caddytls/crypto.go index 347f969c..65b10de3 100644 --- a/caddytls/crypto.go +++ b/caddytls/crypto.go @@ -106,6 +106,11 @@ func stapleOCSP(cert *Certificate, pemBundle []byte) error { } } else { // invalid contents; delete the file + // (we do this independently of the maintenance routine because + // in this case we know for sure this should be a staple file + // because we loaded it by name, whereas the maintenance routine + // just iterates the list of files, even if somehow a non-staple + // file gets in the folder. in this case we are sure it is corrupt.) err := os.Remove(ocspCachePath) if err != nil { log.Printf("[WARNING] Unable to delete invalid OCSP staple file: %v", err)