prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Default OPTIONS responder does not set Content-Length to "0"
  Per RFC 7231:
  
  > A server MUST generate a Content-Length field with a value of "0" if no payload body is to be sent in the response.
  
  
  --- 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/responders.py`
  Content:
  ```
  1 # Copyright 2013 by Rackspace Hosting, Inc.
  2 #
  3 # Licensed under the Apache License, Version 2.0 (the "License");
  4 # you may not use this file except in compliance with the License.
  5 # You may obtain a copy of the License at
  6 #
  7 #    http://www.apache.org/licenses/LICENSE-2.0
  8 #
  9 # Unless required by applicable law or agreed to in writing, software
  10 # distributed under the License is distributed on an "AS IS" BASIS,
  11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12 # See the License for the specific language governing permissions and
  13 # limitations under the License.
  14 
  15 from falcon.errors import HTTPBadRequest
  16 from falcon.errors import HTTPNotFound
  17 from falcon.status_codes import HTTP_204
  18 from falcon.status_codes import HTTP_405
  19 
  20 
  21 def path_not_found(req, resp, **kwargs):
  22     """Raise 404 HTTPNotFound error"""
  23     raise HTTPNotFound()
  24 
  25 
  26 def bad_request(req, resp, **kwargs):
  27     """Raise 400 HTTPBadRequest error"""
  28     raise HTTPBadRequest('Bad request', 'Invalid HTTP method')
  29 
  30 
  31 def create_method_not_allowed(allowed_methods):
  32     """Creates a responder for "405 Method Not Allowed"
  33 
  34     Args:
  35         allowed_methods: A list of HTTP methods (uppercase) that should be
  36             returned in the Allow header.
  37 
  38     """
  39     allowed = ', '.join(allowed_methods)
  40 
  41     def method_not_allowed(req, resp, **kwargs):
  42         resp.status = HTTP_405
  43         resp.set_header('Allow', allowed)
  44 
  45     return method_not_allowed
  46 
  47 
  48 def create_default_options(allowed_methods):
  49     """Creates a default responder for the OPTIONS method
  50 
  51     Args:
  52         allowed_methods: A list of HTTP methods (uppercase) that should be
  53             returned in the Allow header.
  54 
  55     """
  56     allowed = ', '.join(allowed_methods)
  57 
  58     def on_options(req, resp, **kwargs):
  59         resp.status = HTTP_204
  60         resp.set_header('Allow', allowed)
  61 
  62     return on_options
  63
  ```
  --- 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/responders.py b/falcon/responders.py
  --- a/falcon/responders.py
  +++ b/falcon/responders.py
  @@ -58,5 +58,6 @@
       def on_options(req, resp, **kwargs):
           resp.status = HTTP_204
           resp.set_header('Allow', allowed)
  +        resp.set_header('Content-Length', '0')
   
       return on_options
  
verification_info: {"golden_diff": "diff --git a/falcon/responders.py b/falcon/responders.py\n--- a/falcon/responders.py\n+++ b/falcon/responders.py\n@@ -58,5 +58,6 @@\n     def on_options(req, resp, **kwargs):\n         resp.status = HTTP_204\n         resp.set_header('Allow', allowed)\n+        resp.set_header('Content-Length', '0')\n \n     return on_options\n", "issue": "Default OPTIONS responder does not set Content-Length to \"0\"\nPer RFC 7231:\n\n> A server MUST generate a Content-Length field with a value of \"0\" if no payload body is to be sent in the response.\n\n", "before_files": [{"content": "# Copyright 2013 by Rackspace Hosting, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#    http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom falcon.errors import HTTPBadRequest\nfrom falcon.errors import HTTPNotFound\nfrom falcon.status_codes import HTTP_204\nfrom falcon.status_codes import HTTP_405\n\n\ndef path_not_found(req, resp, **kwargs):\n    \"\"\"Raise 404 HTTPNotFound error\"\"\"\n    raise HTTPNotFound()\n\n\ndef bad_request(req, resp, **kwargs):\n    \"\"\"Raise 400 HTTPBadRequest error\"\"\"\n    raise HTTPBadRequest('Bad request', 'Invalid HTTP method')\n\n\ndef create_method_not_allowed(allowed_methods):\n    \"\"\"Creates a responder for \"405 Method Not Allowed\"\n\n    Args:\n        allowed_methods: A list of HTTP methods (uppercase) that should be\n            returned in the Allow header.\n\n    \"\"\"\n    allowed = ', '.join(allowed_methods)\n\n    def method_not_allowed(req, resp, **kwargs):\n        resp.status = HTTP_405\n        resp.set_header('Allow', allowed)\n\n    return method_not_allowed\n\n\ndef create_default_options(allowed_methods):\n    \"\"\"Creates a default responder for the OPTIONS method\n\n    Args:\n        allowed_methods: A list of HTTP methods (uppercase) that should be\n            returned in the Allow header.\n\n    \"\"\"\n    allowed = ', '.join(allowed_methods)\n\n    def on_options(req, resp, **kwargs):\n        resp.status = HTTP_204\n        resp.set_header('Allow', allowed)\n\n    return on_options\n", "path": "falcon/responders.py"}], "after_files": [{"content": "# Copyright 2013 by Rackspace Hosting, Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n#    http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom falcon.errors import HTTPBadRequest\nfrom falcon.errors import HTTPNotFound\nfrom falcon.status_codes import HTTP_204\nfrom falcon.status_codes import HTTP_405\n\n\ndef path_not_found(req, resp, **kwargs):\n    \"\"\"Raise 404 HTTPNotFound error\"\"\"\n    raise HTTPNotFound()\n\n\ndef bad_request(req, resp, **kwargs):\n    \"\"\"Raise 400 HTTPBadRequest error\"\"\"\n    raise HTTPBadRequest('Bad request', 'Invalid HTTP method')\n\n\ndef create_method_not_allowed(allowed_methods):\n    \"\"\"Creates a responder for \"405 Method Not Allowed\"\n\n    Args:\n        allowed_methods: A list of HTTP methods (uppercase) that should be\n            returned in the Allow header.\n\n    \"\"\"\n    allowed = ', '.join(allowed_methods)\n\n    def method_not_allowed(req, resp, **kwargs):\n        resp.status = HTTP_405\n        resp.set_header('Allow', allowed)\n\n    return method_not_allowed\n\n\ndef create_default_options(allowed_methods):\n    \"\"\"Creates a default responder for the OPTIONS method\n\n    Args:\n        allowed_methods: A list of HTTP methods (uppercase) that should be\n            returned in the Allow header.\n\n    \"\"\"\n    allowed = ', '.join(allowed_methods)\n\n    def on_options(req, resp, **kwargs):\n        resp.status = HTTP_204\n        resp.set_header('Allow', allowed)\n        resp.set_header('Content-Length', '0')\n\n    return on_options\n", "path": "falcon/responders.py"}]}