Skip to content

Commit f3b839d

Browse files
committed
Add HTTP QUERY method (RFC 10008) to http library
Closes #153309
1 parent a0e77f2 commit f3b839d

4 files changed

Lines changed: 6 additions & 1 deletion

File tree

Doc/library/http.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ Property Indicates that Details
194194
<HTTPMethod.PATCH>,
195195
<HTTPMethod.POST>,
196196
<HTTPMethod.PUT>,
197+
<HTTPMethod.QUERY>,
197198
<HTTPMethod.TRACE>]
198199

199200
.. _http-methods:
@@ -217,4 +218,5 @@ Method Enum Name Details
217218
``OPTIONS`` ``OPTIONS`` HTTP Semantics :rfc:`9110`, Section 9.3.7
218219
``TRACE`` ``TRACE`` HTTP Semantics :rfc:`9110`, Section 9.3.8
219220
``PATCH`` ``PATCH`` HTTP/1.1 :rfc:`5789`
221+
``QUERY`` ``QUERY`` The HTTP QUERY Method :rfc:`10008`
220222
=========== =================================== ==================================================================

Lib/http/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ class HTTPMethod:
192192
193193
* RFC 9110: HTTP Semantics, obsoletes 7231, which obsoleted 2616
194194
* RFC 5789: PATCH Method for HTTP
195+
* RFC 10008: The HTTP QUERY Method
195196
"""
196197
def __new__(cls, value, description):
197198
obj = str.__new__(cls, value)
@@ -210,4 +211,5 @@ def __repr__(self):
210211
PATCH = 'PATCH', 'Apply partial modifications to a target.'
211212
POST = 'POST', 'Perform target-specific processing with the request payload.'
212213
PUT = 'PUT', 'Replace the target with the request payload.'
214+
QUERY = 'QUERY', 'Query the target with the request payload.'
213215
TRACE = 'TRACE', 'Perform a message loop-back test along the path to the target.'

Lib/wsgiref/validate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ def check_environ(environ):
334334

335335
# @@: these need filling out:
336336
if environ['REQUEST_METHOD'] not in (
337-
'GET', 'HEAD', 'POST', 'OPTIONS', 'PATCH', 'PUT', 'DELETE', 'TRACE'):
337+
'GET', 'HEAD', 'POST', 'OPTIONS', 'PATCH', 'PUT', 'DELETE', 'QUERY', 'TRACE'):
338338
warnings.warn(
339339
"Unknown REQUEST_METHOD: %r" % environ['REQUEST_METHOD'],
340340
WSGIWarning)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add the HTTP QUERY method (RFC 10008) to http.HTTPMethod.

0 commit comments

Comments
 (0)