Skip to content

Commit

Permalink
feat: show the absolute path every time
Browse files Browse the repository at this point in the history
Even for dnslink websites.

fixes #7205
  • Loading branch information
Stebalien committed Apr 27, 2020
1 parent d8bc5c9 commit 619c226
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/corehttp/gateway_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand Down
2 changes: 1 addition & 1 deletion core/corehttp/gateway_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.net/foo? #<'/") {
t.Fatalf("expected a path in directory listing")
}
if !strings.Contains(s, "<a href=\"/foo%3F%20%23%3C%27/./..\">") {
Expand Down

0 comments on commit 619c226

Please sign in to comment.