Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Major changes
- Add support for Python 3.10 up to 3.14.
- Updated :file:`setup.py` with newer Sphinx version and reorganized dependencies (``dev_requires``, ``docs_requires``, ``test_requires``, and ``install_requires``).
- Adjusted a unit test regular expression for :file:`bottle_test.py`.
- Use MDN docs for information about HTTP status codes instead of w3.org.


Internal
Expand Down
15 changes: 2 additions & 13 deletions sphinxcontrib/httpdomain/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,21 +495,10 @@ def report_invalid_code():
return report_invalid_code()
elif status is None:
return report_unknown_code()
elif code == 226:
url = 'https://www.ietf.org/rfc/rfc3229.txt'
elif code == 418:
url = 'https://www.ietf.org/rfc/rfc2324.txt'
elif code == 429:
url = 'https://www.rfc-editor.org/rfc/rfc6585#section-4'
elif code == 449:
url = 'https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-wdv/83ecf19f-e0f8-4706-aae5-ba618f52f100'
elif code == 451:
url = 'https://www.ietf.org/rfc/rfc7725.txt'
elif code in WEBDAV_STATUS_CODES:
url = 'https://www.rfc-editor.org/rfc/rfc4918#section-11.%d' % (WEBDAV_STATUS_CODES.index(code) + 1)
elif code in HTTP_STATUS_CODES:
url = 'https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html' \
'#sec10.' + ('%d.%d' % (code // 100, 1 + code % 100))
elif code in HTTP_STATUS_CODES or code in WEBDAV_STATUS_CODES:
url = f"https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/{code}"
else:
url = ''
node = nodes.reference(rawsource, '%d %s' % (code, status), refuri=url)
Expand Down