summaryrefslogtreecommitdiff
path: root/http.go
diff options
context:
space:
mode:
Diffstat (limited to 'http.go')
-rw-r--r--http.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/http.go b/http.go
index 6197da9..d28c66f 100644
--- a/http.go
+++ b/http.go
@@ -46,11 +46,12 @@ type httpHostMatch struct {
target Target
}
-func (m httpHostMatch) match(br *bufio.Reader) Target {
- if m.matcher(context.TODO(), httpHostHeader(br)) {
- return m.target
+func (m httpHostMatch) match(br *bufio.Reader) (Target, string) {
+ hh := httpHostHeader(br)
+ if m.matcher(context.TODO(), hh) {
+ return m.target, hh
}
- return nil
+ return nil, ""
}
// httpHostHeader returns the HTTP Host header from br without