mirror of
				https://github.com/caddyserver/caddy.git
				synced 2025-11-02 18:47:22 -05:00 
			
		
		
		
	Minor text fixes ;)
This commit is contained in:
		
							parent
							
								
									9d947713ff
								
							
						
					
					
						commit
						151d0baa94
					
				@ -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,
 | 
					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
 | 
					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
 | 
					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
 | 
					and with at least a rough draft of documentation that might go on the website
 | 
				
			||||||
 | 
				
			|||||||
@ -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`
 | 
					1. `go get github.com/mholt/caddy/caddy`
 | 
				
			||||||
2. `cd` into your website's directory
 | 
					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
 | 
					Caddy's `main()` is in the caddy subfolder. To recompile Caddy, use
 | 
				
			||||||
`build.bash` found in that folder.
 | 
					`build.bash` found in that folder.
 | 
				
			||||||
 | 
				
			|||||||
@ -165,5 +165,5 @@ var httpRedirs = map[string]int{
 | 
				
			|||||||
	"304": http.StatusNotModified,
 | 
						"304": http.StatusNotModified,
 | 
				
			||||||
	"305": http.StatusUseProxy,
 | 
						"305": http.StatusUseProxy,
 | 
				
			||||||
	"307": http.StatusTemporaryRedirect,
 | 
						"307": http.StatusTemporaryRedirect,
 | 
				
			||||||
	"308": 308, // Permanent Redirect
 | 
						"308": 308, // Permanent Redirect (RFC 7238)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -130,6 +130,9 @@ func (c *Config) ObtainCert(allowPrompts bool) error {
 | 
				
			|||||||
	return c.obtainCertName(c.Hostname, allowPrompts)
 | 
						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 {
 | 
					func (c *Config) obtainCertName(name string, allowPrompts bool) error {
 | 
				
			||||||
	if !c.Managed || !HostQualifies(name) {
 | 
						if !c.Managed || !HostQualifies(name) {
 | 
				
			||||||
		return nil
 | 
							return nil
 | 
				
			||||||
 | 
				
			|||||||
@ -106,6 +106,11 @@ func stapleOCSP(cert *Certificate, pemBundle []byte) error {
 | 
				
			|||||||
			}
 | 
								}
 | 
				
			||||||
		} else {
 | 
							} else {
 | 
				
			||||||
			// invalid contents; delete the file
 | 
								// 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)
 | 
								err := os.Remove(ocspCachePath)
 | 
				
			||||||
			if err != nil {
 | 
								if err != nil {
 | 
				
			||||||
				log.Printf("[WARNING] Unable to delete invalid OCSP staple file: %v", err)
 | 
									log.Printf("[WARNING] Unable to delete invalid OCSP staple file: %v", err)
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user