Skip to content

Commit 2ee2c4c

Browse files
committed
Expect /doc/rfcNNNN/ without leading zeros
- Legacy-Id: 2019
1 parent d988894 commit 2ee2c4c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

ietf/idrfc/views_doc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747

4848

4949
def document_debug(request, name):
50-
r = re.compile("^rfc([0-9]+)$")
50+
r = re.compile("^rfc([1-9][0-9]*)$")
5151
m = r.match(name)
5252
if m:
5353
rfc_number = int(m.group(1))
@@ -91,7 +91,7 @@ def document_main_rfc(request, rfc_number):
9191

9292
@decorator_from_middleware(GZipMiddleware)
9393
def document_main(request, name):
94-
r = re.compile("^rfc([0-9]+)$")
94+
r = re.compile("^rfc([1-9][0-9]*)$")
9595
m = r.match(name)
9696
if m:
9797
return document_main_rfc(request, int(m.group(1)))
@@ -192,7 +192,7 @@ def _get_versions(draft, include_replaced=True):
192192
return ov
193193

194194
def document_ballot(request, name):
195-
r = re.compile("^rfc([0-9]+)$")
195+
r = re.compile("^rfc([1-9][0-9]*)$")
196196
m = r.match(name)
197197
if m:
198198
id = get_object_or_404(IDInternal, rfc_flag=1, draft=int(m.group(1)))

0 commit comments

Comments
 (0)