Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
Mirrored from https://github.com/Slazee/caddy.git
Synced Nov 14, 05:15 UTC
Fix typos (#3087)
* Fix typo * Fix typo, thanks for Spell Checker under VS Code
Success Go committed
Feb 28, 2020 at 10:30 UTC
ca5c6798806546180994ab7c08e60a5ffeb69394
11 files changed
+14
-14
caddyconfig/caddyfile/parse_test.go
+2
-2
@@ -256,7 +256,7 @@ func TestRecursiveImport(t *testing.T) {
256
return false
257
}
258
if len(got.Segments[0]) != 1 || len(got.Segments[1]) != 2 {
259
- t.Errorf("got unexpect tokens: %v", got.Segments)
259
+ t.Errorf("got unexpected tokens: %v", got.Segments)
260
return false
261
}
262
return true
@@ -351,7 +351,7 @@ func TestDirectiveImport(t *testing.T) {
351
return false
352
}
353
if len(got.Segments[0]) != 1 || len(got.Segments[1]) != 8 {
354
- t.Errorf("got unexpect tokens: %v", got.Segments)
354
+ t.Errorf("got unexpected tokens: %v", got.Segments)
355
return false
356
}
357
return true
caddyconfig/httpcaddyfile/addresses.go
+1
-1
@@ -45,7 +45,7 @@ import (
45
// key of its server block (specifying the host part), and each key may have
46
// a different port. And we definitely need to be sure that a site which is
47
// bound to be served on a specific interface is not served on others just
48
-// beceause that is more convenient: it would be a potential security risk
48
+// because that is more convenient: it would be a potential security risk
49
// if the difference between interfaces means private vs. public.
50
//
51
// So what this function does for the example above is iterate each server
caddyconfig/httpcaddyfile/httptype.go
+3
-3
@@ -972,12 +972,12 @@ func sliceContains(haystack []string, needle string) bool {
972
return false
973
}
974
975
-// specifity returns len(s) minus any wildcards (*) and
975
+// specificity returns len(s) minus any wildcards (*) and
976
// placeholders ({...}). Basically, it's a length count
977
// that penalizes the use of wildcards and placeholders.
978
// This is useful for comparing hostnames and paths.
979
// However, wildcards in paths are not a sure answer to
980
-// the question of specificity. For exmaple,
980
+// the question of specificity. For example,
981
// '*.example.com' is clearly less specific than
982
// 'a.example.com', but is '/a' more or less specific
983
// than '/a*'?
@@ -1018,7 +1018,7 @@ type namedCustomLog struct {
1018
log *caddy.CustomLog
1019
}
1020
1021
-// sbAddrAssocation is a mapping from a list of
1021
+// sbAddrAssociation is a mapping from a list of
1022
// addresses to a list of server blocks that are
1023
// served on those addresses.
1024
type sbAddrAssociation struct {
context.go
+1
-1
@@ -211,7 +211,7 @@ func (ctx Context) LoadModule(structPointer interface{}, fieldName string) (inte
211
}
212
213
// loadModulesFromSomeMap loads modules from val, which must be a type of map[string]interface{}.
214
-// Depending on inlineModuleKey, it will be interpeted as either a ModuleMap (key is the module
214
+// Depending on inlineModuleKey, it will be interpreted as either a ModuleMap (key is the module
215
// name) or as a regular map (key is not the module name, and module name is defined inline).
216
func (ctx Context) loadModulesFromSomeMap(namespace, inlineModuleKey string, val reflect.Value) (map[string]interface{}, error) {
217
// if no inline_key is specified, then val must be a ModuleMap,
modules/caddyhttp/encode/encode.go
+1
-1
@@ -282,7 +282,7 @@ func acceptedEncodings(r *http.Request) []string {
282
}
283
284
// encodings with q-factor of 0 are not accepted;
285
- // use a small theshold to account for float precision
285
+ // use a small threshold to account for float precision
286
if qFactor < 0.00001 {
287
continue
288
}
modules/caddyhttp/fileserver/matcher.go
+1
-1
@@ -51,7 +51,7 @@ type MatchFile struct {
51
Root string `json:"root,omitempty"`
52
53
// The list of files to try. Each path here is
54
- // considered relatice to Root. If nil, the request
54
+ // considered related to Root. If nil, the request
55
// URL's path will be assumed. Files and
56
// directories are treated distinctly, so to match
57
// a directory, the filepath MUST end in a forward
modules/caddyhttp/matchers.go
+1
-1
@@ -680,7 +680,7 @@ func (m MatchRemoteIP) Match(r *http.Request) bool {
680
return false
681
}
682
683
-// MatchRegexp is an embeddable type for matching
683
+// MatchRegexp is an embedable type for matching
684
// using regular expressions. It adds placeholders
685
// to the request's replacer.
686
type MatchRegexp struct {
modules/caddyhttp/reverseproxy/fastcgi/caddyfile.go
+1
-1
@@ -105,7 +105,7 @@ func (t *Transport) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
105
// }
106
//
107
// Thus, this directive produces multiple handlers, each with a different
108
-// matcher because multiple consecutive hgandlers are necessary to support
108
+// matcher because multiple consecutive handlers are necessary to support
109
// the common PHP use case. If this "common" config is not compatible
110
// with a user's PHP requirements, they can use a manual approach based
111
// on the example above to configure it precisely as they need.
modules/caddyhttp/reverseproxy/hosts.go
+1
-1
@@ -27,7 +27,7 @@ import (
27
// Host represents a remote host which can be proxied to.
28
// Its methods must be safe for concurrent use.
29
type Host interface {
30
- // NumRequests returns the numnber of requests
30
+ // NumRequests returns the number of requests
31
// currently in process with the host.
32
NumRequests() int
33
modules/caddyhttp/templates/templates.go
+1
-1
@@ -254,7 +254,7 @@ func (t *Templates) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddy
254
rec.Header().Del("Accept-Ranges") // we don't know ranges for dynamically-created content
255
rec.Header().Del("Last-Modified") // useless for dynamic content since it's always changing
256
257
- // we don't know a way to guickly generate etag for dynamic content,
257
+ // we don't know a way to quickly generate etag for dynamic content,
258
// and weak etags still cause browsers to rely on it even after a
259
// refresh, so disable them until we find a better way to do this
260
rec.Header().Del("Etag")
modules/caddytls/acmemanager.go
+1
-1
@@ -229,7 +229,7 @@ func onDemandAskRequest(ask string, name string) error {
229
230
resp, err := onDemandAskClient.Get(askURL.String())
231
if err != nil {
232
- return fmt.Errorf("error checking %v to deterine if certificate for hostname '%s' should be allowed: %v",
232
+ return fmt.Errorf("error checking %v to determine if certificate for hostname '%s' should be allowed: %v",
233
ask, name, err)
234
}
235
resp.Body.Close()