Bringing in latest from master; refactoring under way

This commit is contained in:
Matthew Holt
2015-05-04 06:53:54 -06:00
parent 5f32f9b1c8
commit 995edf0566
26 changed files with 171 additions and 2428 deletions

View File

@ -13,7 +13,7 @@ import (
// for requests matching a certain path.
type Headers struct {
Next middleware.Handler
Rules []HeaderRule
Rules []Rule
}
// ServeHTTP implements the middleware.Handler interface and serves requests,
@ -30,9 +30,9 @@ func (h Headers) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error)
}
type (
// HeaderRule groups a slice of HTTP headers by a URL pattern.
// Rule groups a slice of HTTP headers by a URL pattern.
// TODO: use http.Header type instead?
HeaderRule struct {
Rule struct {
Url string
Headers []Header
}