Skip to content

Commit 4174196

Browse files
committed
Fixed a problem with missing extensions for external materials URLs, introduced in earlier doc.href() normalization work.
- Legacy-Id: 14077
1 parent f8581f7 commit 4174196

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

ietf/doc/views_doc.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,9 @@ def document_main(request, name, rev=None):
554554
extension = os.path.splitext(g)[1]
555555
t = os.path.splitext(g)[1].lstrip(".")
556556
url = doc.href()
557+
if not url.endswith("/") and not url.endswith(extension):
558+
urlbase, urlext = os.path.splitext(url)
559+
url = urlbase + extension
557560

558561
if extension == ".txt":
559562
content = get_document_content(basename, pathname + extension, split=False)

0 commit comments

Comments
 (0)