func (h Headers) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error) {
	replacer := httpserver.NewReplacer(r, nil, "")
	rww := &responseWriterWrapper{
		ResponseWriterWrapper: &httpserver.ResponseWriterWrapper{ResponseWriter: w},
	}
	for _, rule := range h.Rules {
		if httpserver.Path(r.URL.Path).Matches(rule.Path) {
			for name := range rule.Headers {
				if strings.HasPrefix(name, "-") {
					rww.delHeader(strings.TrimLeft(name, "-"))
				} else if strings.HasPrefix(name, "+") {
					for _, value := range rule.Headers[name] {
						rww.Header().Add(strings.TrimLeft(name, "+"), replacer.Replace(value))
					}
				} else {
					for _, value := range rule.Headers[name] {
						rww.Header().Set(name, replacer.Replace(value))
					}
				}
			}
		}
	}
	return h.Next.ServeHTTP(rww, r)
}
ServeHTTP implements the httpserver.Handler interface and serves requests,
setting headers on the response according to the configured rules.
package header
import (
	"net/http"
	"strings"
	"github.com/tmpim/casket/caskethttp/httpserver"
)
type Headers struct {
	Next  httpserver.Handler
	Rules []Rule
}