prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  WebDAV methods not supported
  Falcon defines supported HTTP methods in `falcon/constants.py`: supported are "usual" `HTTP_METHODS` and, in addition to that, `WEBDAV_METHODS`. However, only WebDAV versioning extension methods from RFC 3253 are supported, but not the "ordinary" WebDAV ones (i.e. from RFCs 2518 & 4918) like `COPY`, `LOCK`, `MKCOL`, `MOVE` etc.
  
  Supporting only an extension, but not the core upon which that extension builds looks somewhat inconsistent.
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `falcon/constants.py`
  Content:
  ```
  1 import os
  2 
  3 # RFC 7231, 5789 methods
  4 HTTP_METHODS = [
  5     'CONNECT',
  6     'DELETE',
  7     'GET',
  8     'HEAD',
  9     'OPTIONS',
  10     'PATCH',
  11     'POST',
  12     'PUT',
  13     'TRACE',
  14 ]
  15 
  16 # RFC 3253 methods
  17 WEBDAV_METHODS = [
  18     'CHECKIN',
  19     'CHECKOUT',
  20     'REPORT',
  21     'UNCHECKIN',
  22     'UPDATE',
  23     'VERSION-CONTROL',
  24 ]
  25 
  26 # if FALCON_CUSTOM_HTTP_METHODS is defined, treat it as a comma-
  27 # delimited string of additional supported methods in this env.
  28 FALCON_CUSTOM_HTTP_METHODS = [
  29     method.strip().upper()
  30     for method in os.environ.get('FALCON_CUSTOM_HTTP_METHODS', '').split(',')
  31     if method.strip() != ''
  32 ]
  33 
  34 COMBINED_METHODS = HTTP_METHODS + WEBDAV_METHODS + FALCON_CUSTOM_HTTP_METHODS
  35 
  36 # NOTE(kgriffs): According to RFC 7159, most JSON parsers assume
  37 # UTF-8 and so it is the recommended default charset going forward,
  38 # and indeed, other charsets should not be specified to ensure
  39 # maximum interoperability.
  40 MEDIA_JSON = 'application/json'
  41 
  42 # NOTE(kgriffs): An internet media type for MessagePack has not
  43 # yet been registered. 'application/x-msgpack' is commonly used,
  44 # but the use of the 'x-' prefix is discouraged by RFC 6838.
  45 MEDIA_MSGPACK = 'application/msgpack'
  46 
  47 # NOTE(kgriffs): An internet media type for YAML has not been
  48 # registered. RoR uses 'application/x-yaml', but since use of
  49 # 'x-' is discouraged by RFC 6838, we don't use it in Falcon.
  50 #
  51 # The YAML specification requires that parsers deduce the character
  52 # encoding by examining the first few bytes of the document itself.
  53 # Therefore, it does not make sense to include the charset in the
  54 # media type string.
  55 MEDIA_YAML = 'application/yaml'
  56 
  57 # NOTE(kgriffs): According to RFC 7303, when the charset is
  58 # omitted, preference is given to the encoding specified in the
  59 # document itself (either via a BOM, or via the XML declaration). If
  60 # the document does not explicitly specify the encoding, UTF-8 is
  61 # assumed. We do not specify the charset here, because many parsers
  62 # ignore it anyway and just use what is specified in the document,
  63 # contrary to the RFCs.
  64 MEDIA_XML = 'application/xml'
  65 
  66 
  67 # NOTE(kgriffs): RFC 4329 recommends application/* over text/.
  68 # futhermore, parsers are required to respect the Unicode
  69 # encoding signature, if present in the document, and to default
  70 # to UTF-8 when not present. Note, however, that implementations
  71 # are not required to support anything besides UTF-8, so it is
  72 # unclear how much utility an encoding signature (or the charset
  73 # parameter for that matter) has in practice.
  74 MEDIA_JS = 'application/javascript'
  75 
  76 # NOTE(kgriffs): According to RFC 6838, most text media types should
  77 # include the charset parameter.
  78 MEDIA_HTML = 'text/html; charset=utf-8'
  79 MEDIA_TEXT = 'text/plain; charset=utf-8'
  80 
  81 MEDIA_JPEG = 'image/jpeg'
  82 MEDIA_PNG = 'image/png'
  83 MEDIA_GIF = 'image/gif'
  84 
  85 DEFAULT_MEDIA_TYPE = MEDIA_JSON
  86
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/falcon/constants.py b/falcon/constants.py
  --- a/falcon/constants.py
  +++ b/falcon/constants.py
  @@ -13,12 +13,19 @@
       'TRACE',
   ]
   
  -# RFC 3253 methods
  +# RFC 2518 and 4918 methods
   WEBDAV_METHODS = [
       'CHECKIN',
       'CHECKOUT',
  +    'COPY',
  +    'LOCK',
  +    'MKCOL',
  +    'MOVE',
  +    'PROPFIND',
  +    'PROPPATCH',
       'REPORT',
       'UNCHECKIN',
  +    'UNLOCK'
       'UPDATE',
       'VERSION-CONTROL',
   ]
  @@ -63,7 +70,6 @@
   # contrary to the RFCs.
   MEDIA_XML = 'application/xml'
   
  -
   # NOTE(kgriffs): RFC 4329 recommends application/* over text/.
   # futhermore, parsers are required to respect the Unicode
   # encoding signature, if present in the document, and to default
  
verification_info: {"golden_diff": "diff --git a/falcon/constants.py b/falcon/constants.py\n--- a/falcon/constants.py\n+++ b/falcon/constants.py\n@@ -13,12 +13,19 @@\n     'TRACE',\n ]\n \n-# RFC 3253 methods\n+# RFC 2518 and 4918 methods\n WEBDAV_METHODS = [\n     'CHECKIN',\n     'CHECKOUT',\n+    'COPY',\n+    'LOCK',\n+    'MKCOL',\n+    'MOVE',\n+    'PROPFIND',\n+    'PROPPATCH',\n     'REPORT',\n     'UNCHECKIN',\n+    'UNLOCK'\n     'UPDATE',\n     'VERSION-CONTROL',\n ]\n@@ -63,7 +70,6 @@\n # contrary to the RFCs.\n MEDIA_XML = 'application/xml'\n \n-\n # NOTE(kgriffs): RFC 4329 recommends application/* over text/.\n # futhermore, parsers are required to respect the Unicode\n # encoding signature, if present in the document, and to default\n", "issue": "WebDAV methods not supported\nFalcon defines supported HTTP methods in `falcon/constants.py`: supported are \"usual\" `HTTP_METHODS` and, in addition to that, `WEBDAV_METHODS`. However, only WebDAV versioning extension methods from RFC 3253 are supported, but not the \"ordinary\" WebDAV ones (i.e. from RFCs 2518 & 4918) like `COPY`, `LOCK`, `MKCOL`, `MOVE` etc.\r\n\r\nSupporting only an extension, but not the core upon which that extension builds looks somewhat inconsistent.\n", "before_files": [{"content": "import os\n\n# RFC 7231, 5789 methods\nHTTP_METHODS = [\n    'CONNECT',\n    'DELETE',\n    'GET',\n    'HEAD',\n    'OPTIONS',\n    'PATCH',\n    'POST',\n    'PUT',\n    'TRACE',\n]\n\n# RFC 3253 methods\nWEBDAV_METHODS = [\n    'CHECKIN',\n    'CHECKOUT',\n    'REPORT',\n    'UNCHECKIN',\n    'UPDATE',\n    'VERSION-CONTROL',\n]\n\n# if FALCON_CUSTOM_HTTP_METHODS is defined, treat it as a comma-\n# delimited string of additional supported methods in this env.\nFALCON_CUSTOM_HTTP_METHODS = [\n    method.strip().upper()\n    for method in os.environ.get('FALCON_CUSTOM_HTTP_METHODS', '').split(',')\n    if method.strip() != ''\n]\n\nCOMBINED_METHODS = HTTP_METHODS + WEBDAV_METHODS + FALCON_CUSTOM_HTTP_METHODS\n\n# NOTE(kgriffs): According to RFC 7159, most JSON parsers assume\n# UTF-8 and so it is the recommended default charset going forward,\n# and indeed, other charsets should not be specified to ensure\n# maximum interoperability.\nMEDIA_JSON = 'application/json'\n\n# NOTE(kgriffs): An internet media type for MessagePack has not\n# yet been registered. 'application/x-msgpack' is commonly used,\n# but the use of the 'x-' prefix is discouraged by RFC 6838.\nMEDIA_MSGPACK = 'application/msgpack'\n\n# NOTE(kgriffs): An internet media type for YAML has not been\n# registered. RoR uses 'application/x-yaml', but since use of\n# 'x-' is discouraged by RFC 6838, we don't use it in Falcon.\n#\n# The YAML specification requires that parsers deduce the character\n# encoding by examining the first few bytes of the document itself.\n# Therefore, it does not make sense to include the charset in the\n# media type string.\nMEDIA_YAML = 'application/yaml'\n\n# NOTE(kgriffs): According to RFC 7303, when the charset is\n# omitted, preference is given to the encoding specified in the\n# document itself (either via a BOM, or via the XML declaration). If\n# the document does not explicitly specify the encoding, UTF-8 is\n# assumed. We do not specify the charset here, because many parsers\n# ignore it anyway and just use what is specified in the document,\n# contrary to the RFCs.\nMEDIA_XML = 'application/xml'\n\n\n# NOTE(kgriffs): RFC 4329 recommends application/* over text/.\n# futhermore, parsers are required to respect the Unicode\n# encoding signature, if present in the document, and to default\n# to UTF-8 when not present. Note, however, that implementations\n# are not required to support anything besides UTF-8, so it is\n# unclear how much utility an encoding signature (or the charset\n# parameter for that matter) has in practice.\nMEDIA_JS = 'application/javascript'\n\n# NOTE(kgriffs): According to RFC 6838, most text media types should\n# include the charset parameter.\nMEDIA_HTML = 'text/html; charset=utf-8'\nMEDIA_TEXT = 'text/plain; charset=utf-8'\n\nMEDIA_JPEG = 'image/jpeg'\nMEDIA_PNG = 'image/png'\nMEDIA_GIF = 'image/gif'\n\nDEFAULT_MEDIA_TYPE = MEDIA_JSON\n", "path": "falcon/constants.py"}], "after_files": [{"content": "import os\n\n# RFC 7231, 5789 methods\nHTTP_METHODS = [\n    'CONNECT',\n    'DELETE',\n    'GET',\n    'HEAD',\n    'OPTIONS',\n    'PATCH',\n    'POST',\n    'PUT',\n    'TRACE',\n]\n\n# RFC 2518 and 4918 methods\nWEBDAV_METHODS = [\n    'CHECKIN',\n    'CHECKOUT',\n    'COPY',\n    'LOCK',\n    'MKCOL',\n    'MOVE',\n    'PROPFIND',\n    'PROPPATCH',\n    'REPORT',\n    'UNCHECKIN',\n    'UNLOCK'\n    'UPDATE',\n    'VERSION-CONTROL',\n]\n\n# if FALCON_CUSTOM_HTTP_METHODS is defined, treat it as a comma-\n# delimited string of additional supported methods in this env.\nFALCON_CUSTOM_HTTP_METHODS = [\n    method.strip().upper()\n    for method in os.environ.get('FALCON_CUSTOM_HTTP_METHODS', '').split(',')\n    if method.strip() != ''\n]\n\nCOMBINED_METHODS = HTTP_METHODS + WEBDAV_METHODS + FALCON_CUSTOM_HTTP_METHODS\n\n# NOTE(kgriffs): According to RFC 7159, most JSON parsers assume\n# UTF-8 and so it is the recommended default charset going forward,\n# and indeed, other charsets should not be specified to ensure\n# maximum interoperability.\nMEDIA_JSON = 'application/json'\n\n# NOTE(kgriffs): An internet media type for MessagePack has not\n# yet been registered. 'application/x-msgpack' is commonly used,\n# but the use of the 'x-' prefix is discouraged by RFC 6838.\nMEDIA_MSGPACK = 'application/msgpack'\n\n# NOTE(kgriffs): An internet media type for YAML has not been\n# registered. RoR uses 'application/x-yaml', but since use of\n# 'x-' is discouraged by RFC 6838, we don't use it in Falcon.\n#\n# The YAML specification requires that parsers deduce the character\n# encoding by examining the first few bytes of the document itself.\n# Therefore, it does not make sense to include the charset in the\n# media type string.\nMEDIA_YAML = 'application/yaml'\n\n# NOTE(kgriffs): According to RFC 7303, when the charset is\n# omitted, preference is given to the encoding specified in the\n# document itself (either via a BOM, or via the XML declaration). If\n# the document does not explicitly specify the encoding, UTF-8 is\n# assumed. We do not specify the charset here, because many parsers\n# ignore it anyway and just use what is specified in the document,\n# contrary to the RFCs.\nMEDIA_XML = 'application/xml'\n\n# NOTE(kgriffs): RFC 4329 recommends application/* over text/.\n# futhermore, parsers are required to respect the Unicode\n# encoding signature, if present in the document, and to default\n# to UTF-8 when not present. Note, however, that implementations\n# are not required to support anything besides UTF-8, so it is\n# unclear how much utility an encoding signature (or the charset\n# parameter for that matter) has in practice.\nMEDIA_JS = 'application/javascript'\n\n# NOTE(kgriffs): According to RFC 6838, most text media types should\n# include the charset parameter.\nMEDIA_HTML = 'text/html; charset=utf-8'\nMEDIA_TEXT = 'text/plain; charset=utf-8'\n\nMEDIA_JPEG = 'image/jpeg'\nMEDIA_PNG = 'image/png'\nMEDIA_GIF = 'image/gif'\n\nDEFAULT_MEDIA_TYPE = MEDIA_JSON\n", "path": "falcon/constants.py"}]}