diff --git a/core/corehttp/gateway_handler.go b/core/corehttp/gateway_handler.go index f34bbeb76b93..2729f04e6199 100644 --- a/core/corehttp/gateway_handler.go +++ b/core/corehttp/gateway_handler.go @@ -335,7 +335,7 @@ func (i *gatewayHandler) getOrHeadHandler(w http.ResponseWriter, r *http.Request // See comment above where originalUrlPath is declared. tplData := listingTemplateData{ Listing: dirListing, - Path: originalUrlPath, + Path: urlPath, BackLink: backLink, Hash: hash, } diff --git a/core/corehttp/gateway_test.go b/core/corehttp/gateway_test.go index daf1af07c6c8..d85ee40eef9c 100644 --- a/core/corehttp/gateway_test.go +++ b/core/corehttp/gateway_test.go @@ -378,7 +378,7 @@ func TestIPNSHostnameBacklinks(t *testing.T) { s := string(body) t.Logf("body: %s\n", string(body)) - if !strings.Contains(s, "Index of /foo? #<'/") { + if !strings.Contains(s, "Index of /ipns/example.com/foo? #<'/") { t.Fatalf("expected a path in directory listing") } if !strings.Contains(s, "") {