We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add support for headers to DjangoParser
```
NotImplementedError: Header parsing not supported by DjangoParser
```

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `src/webargs/djangoparser.py`
Content:
```
1 """Django request argument parsing.
2 
3 Example usage: ::
4 
5     from django.views.generic import View
6     from django.http import HttpResponse
7     from marshmallow import fields
8     from webargs.djangoparser import use_args
9 
10     hello_args = {
11         'name': fields.Str(missing='World')
12     }
13 
14     class MyView(View):
15 
16         @use_args(hello_args)
17         def get(self, args, request):
18             return HttpResponse('Hello ' + args['name'])
19 """
20 from webargs import core
21 from webargs.multidictproxy import MultiDictProxy
22 
23 
24 def is_json_request(req):
25     return core.is_json(req.content_type)
26 
27 
28 class DjangoParser(core.Parser):
29     """Django request argument parser.
30 
31     .. warning::
32 
33         :class:`DjangoParser` does not override
34         :meth:`handle_error <webargs.core.Parser.handle_error>`, so your Django
35         views are responsible for catching any :exc:`ValidationErrors` raised by
36         the parser and returning the appropriate `HTTPResponse`.
37     """
38 
39     def _raw_load_json(self, req):
40         """Read a json payload from the request for the core parser's load_json
41 
42         Checks the input mimetype and may return 'missing' if the mimetype is
43         non-json, even if the request body is parseable as json."""
44         if not is_json_request(req):
45             return core.missing
46 
47         return core.parse_json(req.body)
48 
49     def load_querystring(self, req, schema):
50         """Return query params from the request as a MultiDictProxy."""
51         return MultiDictProxy(req.GET, schema)
52 
53     def load_form(self, req, schema):
54         """Return form values from the request as a MultiDictProxy."""
55         return MultiDictProxy(req.POST, schema)
56 
57     def load_cookies(self, req, schema):
58         """Return cookies from the request."""
59         return req.COOKIES
60 
61     def load_headers(self, req, schema):
62         raise NotImplementedError(
63             f"Header parsing not supported by {self.__class__.__name__}"
64         )
65 
66     def load_files(self, req, schema):
67         """Return files from the request as a MultiDictProxy."""
68         return MultiDictProxy(req.FILES, schema)
69 
70     def get_request_from_view_args(self, view, args, kwargs):
71         # The first argument is either `self` or `request`
72         try:  # self.request
73             return args[0].request
74         except AttributeError:  # first arg is request
75             return args[0]
76 
77 
78 parser = DjangoParser()
79 use_args = parser.use_args
80 use_kwargs = parser.use_kwargs
81
```

Path: `setup.py`
Content:
```
1 import re
2 from setuptools import setup, find_packages
3 
4 FRAMEWORKS = [
5     "Flask>=0.12.2",
6     "Django>=1.11.16",
7     "bottle>=0.12.13",
8     "tornado>=4.5.2",
9     "pyramid>=1.9.1",
10     "webapp2>=3.0.0b1",
11     "falcon>=2.0.0",
12     "aiohttp>=3.0.0",
13 ]
14 EXTRAS_REQUIRE = {
15     "frameworks": FRAMEWORKS,
16     "tests": [
17         "pytest",
18         "webtest==2.0.35",
19         "webtest-aiohttp==2.0.0",
20         "pytest-aiohttp>=0.3.0",
21     ]
22     + FRAMEWORKS,
23     "lint": [
24         "mypy==0.790",
25         "flake8==3.8.4",
26         "flake8-bugbear==20.1.4",
27         "pre-commit~=2.4",
28     ],
29     "docs": ["Sphinx==3.3.0", "sphinx-issues==1.2.0", "sphinx-typlog-theme==0.8.0"]
30     + FRAMEWORKS,
31 }
32 EXTRAS_REQUIRE["dev"] = EXTRAS_REQUIRE["tests"] + EXTRAS_REQUIRE["lint"] + ["tox"]
33 
34 
35 def find_version(fname):
36     """Attempts to find the version number in the file names fname.
37     Raises RuntimeError if not found.
38     """
39     version = ""
40     with open(fname) as fp:
41         reg = re.compile(r'__version__ = [\'"]([^\'"]*)[\'"]')
42         for line in fp:
43             m = reg.match(line)
44             if m:
45                 version = m.group(1)
46                 break
47     if not version:
48         raise RuntimeError("Cannot find version information")
49     return version
50 
51 
52 def read(fname):
53     with open(fname) as fp:
54         content = fp.read()
55     return content
56 
57 
58 setup(
59     name="webargs",
60     version=find_version("src/webargs/__init__.py"),
61     description=(
62         "Declarative parsing and validation of HTTP request objects, "
63         "with built-in support for popular web frameworks, including "
64         "Flask, Django, Bottle, Tornado, Pyramid, webapp2, Falcon, and aiohttp."
65     ),
66     long_description=read("README.rst"),
67     author="Steven Loria",
68     author_email="sloria1@gmail.com",
69     url="https://github.com/marshmallow-code/webargs",
70     packages=find_packages("src"),
71     package_dir={"": "src"},
72     install_requires=["marshmallow>=3.0.0"],
73     extras_require=EXTRAS_REQUIRE,
74     license="MIT",
75     zip_safe=False,
76     keywords=(
77         "webargs",
78         "http",
79         "flask",
80         "django",
81         "bottle",
82         "tornado",
83         "aiohttp",
84         "webapp2",
85         "request",
86         "arguments",
87         "validation",
88         "parameters",
89         "rest",
90         "api",
91         "marshmallow",
92     ),
93     python_requires=">=3.6",
94     classifiers=[
95         "Development Status :: 5 - Production/Stable",
96         "Intended Audience :: Developers",
97         "License :: OSI Approved :: MIT License",
98         "Natural Language :: English",
99         "Programming Language :: Python :: 3",
100         "Programming Language :: Python :: 3.6",
101         "Programming Language :: Python :: 3.7",
102         "Programming Language :: Python :: 3.8",
103         "Programming Language :: Python :: 3.9",
104         "Programming Language :: Python :: 3 :: Only",
105         "Topic :: Internet :: WWW/HTTP :: Dynamic Content",
106         "Topic :: Internet :: WWW/HTTP :: WSGI :: Application",
107     ],
108     test_suite="tests",
109     project_urls={
110         "Changelog": "https://webargs.readthedocs.io/en/latest/changelog.html",
111         "Issues": "https://github.com/marshmallow-code/webargs/issues",
112         "Funding": "https://opencollective.com/marshmallow",
113         "Tidelift": "https://tidelift.com/subscription/pkg/pypi-webargs?utm_source=pypi-marshmallow&utm_medium=pypi",  # noqa
114     },
115 )
116
```
--- 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()

```

diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -3,7 +3,7 @@
 
 FRAMEWORKS = [
     "Flask>=0.12.2",
-    "Django>=1.11.16",
+    "Django>=2.2.0",
     "bottle>=0.12.13",
     "tornado>=4.5.2",
     "pyramid>=1.9.1",
diff --git a/src/webargs/djangoparser.py b/src/webargs/djangoparser.py
--- a/src/webargs/djangoparser.py
+++ b/src/webargs/djangoparser.py
@@ -59,9 +59,10 @@
         return req.COOKIES
 
     def load_headers(self, req, schema):
-        raise NotImplementedError(
-            f"Header parsing not supported by {self.__class__.__name__}"
-        )
+        """Return headers from the request."""
+        # Django's HttpRequest.headers is a case-insensitive dict type, but it
+        # isn't a multidict, so this is not proxied
+        return req.headers
 
     def load_files(self, req, schema):
         """Return files from the request as a MultiDictProxy."""

{"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -3,7 +3,7 @@\n \n FRAMEWORKS = [\n     \"Flask>=0.12.2\",\n-    \"Django>=1.11.16\",\n+    \"Django>=2.2.0\",\n     \"bottle>=0.12.13\",\n     \"tornado>=4.5.2\",\n     \"pyramid>=1.9.1\",\ndiff --git a/src/webargs/djangoparser.py b/src/webargs/djangoparser.py\n--- a/src/webargs/djangoparser.py\n+++ b/src/webargs/djangoparser.py\n@@ -59,9 +59,10 @@\n         return req.COOKIES\n \n     def load_headers(self, req, schema):\n-        raise NotImplementedError(\n-            f\"Header parsing not supported by {self.__class__.__name__}\"\n-        )\n+        \"\"\"Return headers from the request.\"\"\"\n+        # Django's HttpRequest.headers is a case-insensitive dict type, but it\n+        # isn't a multidict, so this is not proxied\n+        return req.headers\n \n     def load_files(self, req, schema):\n         \"\"\"Return files from the request as a MultiDictProxy.\"\"\"\n", "issue": "Add support for headers to DjangoParser\n```\r\nNotImplementedError: Header parsing not supported by DjangoParser\r\n```\n", "before_files": [{"content": "\"\"\"Django request argument parsing.\n\nExample usage: ::\n\n    from django.views.generic import View\n    from django.http import HttpResponse\n    from marshmallow import fields\n    from webargs.djangoparser import use_args\n\n    hello_args = {\n        'name': fields.Str(missing='World')\n    }\n\n    class MyView(View):\n\n        @use_args(hello_args)\n        def get(self, args, request):\n            return HttpResponse('Hello ' + args['name'])\n\"\"\"\nfrom webargs import core\nfrom webargs.multidictproxy import MultiDictProxy\n\n\ndef is_json_request(req):\n    return core.is_json(req.content_type)\n\n\nclass DjangoParser(core.Parser):\n    \"\"\"Django request argument parser.\n\n    .. warning::\n\n        :class:`DjangoParser` does not override\n        :meth:`handle_error <webargs.core.Parser.handle_error>`, so your Django\n        views are responsible for catching any :exc:`ValidationErrors` raised by\n        the parser and returning the appropriate `HTTPResponse`.\n    \"\"\"\n\n    def _raw_load_json(self, req):\n        \"\"\"Read a json payload from the request for the core parser's load_json\n\n        Checks the input mimetype and may return 'missing' if the mimetype is\n        non-json, even if the request body is parseable as json.\"\"\"\n        if not is_json_request(req):\n            return core.missing\n\n        return core.parse_json(req.body)\n\n    def load_querystring(self, req, schema):\n        \"\"\"Return query params from the request as a MultiDictProxy.\"\"\"\n        return MultiDictProxy(req.GET, schema)\n\n    def load_form(self, req, schema):\n        \"\"\"Return form values from the request as a MultiDictProxy.\"\"\"\n        return MultiDictProxy(req.POST, schema)\n\n    def load_cookies(self, req, schema):\n        \"\"\"Return cookies from the request.\"\"\"\n        return req.COOKIES\n\n    def load_headers(self, req, schema):\n        raise NotImplementedError(\n            f\"Header parsing not supported by {self.__class__.__name__}\"\n        )\n\n    def load_files(self, req, schema):\n        \"\"\"Return files from the request as a MultiDictProxy.\"\"\"\n        return MultiDictProxy(req.FILES, schema)\n\n    def get_request_from_view_args(self, view, args, kwargs):\n        # The first argument is either `self` or `request`\n        try:  # self.request\n            return args[0].request\n        except AttributeError:  # first arg is request\n            return args[0]\n\n\nparser = DjangoParser()\nuse_args = parser.use_args\nuse_kwargs = parser.use_kwargs\n", "path": "src/webargs/djangoparser.py"}, {"content": "import re\nfrom setuptools import setup, find_packages\n\nFRAMEWORKS = [\n    \"Flask>=0.12.2\",\n    \"Django>=1.11.16\",\n    \"bottle>=0.12.13\",\n    \"tornado>=4.5.2\",\n    \"pyramid>=1.9.1\",\n    \"webapp2>=3.0.0b1\",\n    \"falcon>=2.0.0\",\n    \"aiohttp>=3.0.0\",\n]\nEXTRAS_REQUIRE = {\n    \"frameworks\": FRAMEWORKS,\n    \"tests\": [\n        \"pytest\",\n        \"webtest==2.0.35\",\n        \"webtest-aiohttp==2.0.0\",\n        \"pytest-aiohttp>=0.3.0\",\n    ]\n    + FRAMEWORKS,\n    \"lint\": [\n        \"mypy==0.790\",\n        \"flake8==3.8.4\",\n        \"flake8-bugbear==20.1.4\",\n        \"pre-commit~=2.4\",\n    ],\n    \"docs\": [\"Sphinx==3.3.0\", \"sphinx-issues==1.2.0\", \"sphinx-typlog-theme==0.8.0\"]\n    + FRAMEWORKS,\n}\nEXTRAS_REQUIRE[\"dev\"] = EXTRAS_REQUIRE[\"tests\"] + EXTRAS_REQUIRE[\"lint\"] + [\"tox\"]\n\n\ndef find_version(fname):\n    \"\"\"Attempts to find the version number in the file names fname.\n    Raises RuntimeError if not found.\n    \"\"\"\n    version = \"\"\n    with open(fname) as fp:\n        reg = re.compile(r'__version__ = [\\'\"]([^\\'\"]*)[\\'\"]')\n        for line in fp:\n            m = reg.match(line)\n            if m:\n                version = m.group(1)\n                break\n    if not version:\n        raise RuntimeError(\"Cannot find version information\")\n    return version\n\n\ndef read(fname):\n    with open(fname) as fp:\n        content = fp.read()\n    return content\n\n\nsetup(\n    name=\"webargs\",\n    version=find_version(\"src/webargs/__init__.py\"),\n    description=(\n        \"Declarative parsing and validation of HTTP request objects, \"\n        \"with built-in support for popular web frameworks, including \"\n        \"Flask, Django, Bottle, Tornado, Pyramid, webapp2, Falcon, and aiohttp.\"\n    ),\n    long_description=read(\"README.rst\"),\n    author=\"Steven Loria\",\n    author_email=\"sloria1@gmail.com\",\n    url=\"https://github.com/marshmallow-code/webargs\",\n    packages=find_packages(\"src\"),\n    package_dir={\"\": \"src\"},\n    install_requires=[\"marshmallow>=3.0.0\"],\n    extras_require=EXTRAS_REQUIRE,\n    license=\"MIT\",\n    zip_safe=False,\n    keywords=(\n        \"webargs\",\n        \"http\",\n        \"flask\",\n        \"django\",\n        \"bottle\",\n        \"tornado\",\n        \"aiohttp\",\n        \"webapp2\",\n        \"request\",\n        \"arguments\",\n        \"validation\",\n        \"parameters\",\n        \"rest\",\n        \"api\",\n        \"marshmallow\",\n    ),\n    python_requires=\">=3.6\",\n    classifiers=[\n        \"Development Status :: 5 - Production/Stable\",\n        \"Intended Audience :: Developers\",\n        \"License :: OSI Approved :: MIT License\",\n        \"Natural Language :: English\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.6\",\n        \"Programming Language :: Python :: 3.7\",\n        \"Programming Language :: Python :: 3.8\",\n        \"Programming Language :: Python :: 3.9\",\n        \"Programming Language :: Python :: 3 :: Only\",\n        \"Topic :: Internet :: WWW/HTTP :: Dynamic Content\",\n        \"Topic :: Internet :: WWW/HTTP :: WSGI :: Application\",\n    ],\n    test_suite=\"tests\",\n    project_urls={\n        \"Changelog\": \"https://webargs.readthedocs.io/en/latest/changelog.html\",\n        \"Issues\": \"https://github.com/marshmallow-code/webargs/issues\",\n        \"Funding\": \"https://opencollective.com/marshmallow\",\n        \"Tidelift\": \"https://tidelift.com/subscription/pkg/pypi-webargs?utm_source=pypi-marshmallow&utm_medium=pypi\",  # noqa\n    },\n)\n", "path": "setup.py"}], "after_files": [{"content": "\"\"\"Django request argument parsing.\n\nExample usage: ::\n\n    from django.views.generic import View\n    from django.http import HttpResponse\n    from marshmallow import fields\n    from webargs.djangoparser import use_args\n\n    hello_args = {\n        'name': fields.Str(missing='World')\n    }\n\n    class MyView(View):\n\n        @use_args(hello_args)\n        def get(self, args, request):\n            return HttpResponse('Hello ' + args['name'])\n\"\"\"\nfrom webargs import core\nfrom webargs.multidictproxy import MultiDictProxy\n\n\ndef is_json_request(req):\n    return core.is_json(req.content_type)\n\n\nclass DjangoParser(core.Parser):\n    \"\"\"Django request argument parser.\n\n    .. warning::\n\n        :class:`DjangoParser` does not override\n        :meth:`handle_error <webargs.core.Parser.handle_error>`, so your Django\n        views are responsible for catching any :exc:`ValidationErrors` raised by\n        the parser and returning the appropriate `HTTPResponse`.\n    \"\"\"\n\n    def _raw_load_json(self, req):\n        \"\"\"Read a json payload from the request for the core parser's load_json\n\n        Checks the input mimetype and may return 'missing' if the mimetype is\n        non-json, even if the request body is parseable as json.\"\"\"\n        if not is_json_request(req):\n            return core.missing\n\n        return core.parse_json(req.body)\n\n    def load_querystring(self, req, schema):\n        \"\"\"Return query params from the request as a MultiDictProxy.\"\"\"\n        return MultiDictProxy(req.GET, schema)\n\n    def load_form(self, req, schema):\n        \"\"\"Return form values from the request as a MultiDictProxy.\"\"\"\n        return MultiDictProxy(req.POST, schema)\n\n    def load_cookies(self, req, schema):\n        \"\"\"Return cookies from the request.\"\"\"\n        return req.COOKIES\n\n    def load_headers(self, req, schema):\n        \"\"\"Return headers from the request.\"\"\"\n        # Django's HttpRequest.headers is a case-insensitive dict type, but it\n        # isn't a multidict, so this is not proxied\n        return req.headers\n\n    def load_files(self, req, schema):\n        \"\"\"Return files from the request as a MultiDictProxy.\"\"\"\n        return MultiDictProxy(req.FILES, schema)\n\n    def get_request_from_view_args(self, view, args, kwargs):\n        # The first argument is either `self` or `request`\n        try:  # self.request\n            return args[0].request\n        except AttributeError:  # first arg is request\n            return args[0]\n\n\nparser = DjangoParser()\nuse_args = parser.use_args\nuse_kwargs = parser.use_kwargs\n", "path": "src/webargs/djangoparser.py"}, {"content": "import re\nfrom setuptools import setup, find_packages\n\nFRAMEWORKS = [\n    \"Flask>=0.12.2\",\n    \"Django>=2.2.0\",\n    \"bottle>=0.12.13\",\n    \"tornado>=4.5.2\",\n    \"pyramid>=1.9.1\",\n    \"webapp2>=3.0.0b1\",\n    \"falcon>=2.0.0\",\n    \"aiohttp>=3.0.0\",\n]\nEXTRAS_REQUIRE = {\n    \"frameworks\": FRAMEWORKS,\n    \"tests\": [\n        \"pytest\",\n        \"webtest==2.0.35\",\n        \"webtest-aiohttp==2.0.0\",\n        \"pytest-aiohttp>=0.3.0\",\n    ]\n    + FRAMEWORKS,\n    \"lint\": [\n        \"mypy==0.790\",\n        \"flake8==3.8.4\",\n        \"flake8-bugbear==20.1.4\",\n        \"pre-commit~=2.4\",\n    ],\n    \"docs\": [\"Sphinx==3.3.0\", \"sphinx-issues==1.2.0\", \"sphinx-typlog-theme==0.8.0\"]\n    + FRAMEWORKS,\n}\nEXTRAS_REQUIRE[\"dev\"] = EXTRAS_REQUIRE[\"tests\"] + EXTRAS_REQUIRE[\"lint\"] + [\"tox\"]\n\n\ndef find_version(fname):\n    \"\"\"Attempts to find the version number in the file names fname.\n    Raises RuntimeError if not found.\n    \"\"\"\n    version = \"\"\n    with open(fname) as fp:\n        reg = re.compile(r'__version__ = [\\'\"]([^\\'\"]*)[\\'\"]')\n        for line in fp:\n            m = reg.match(line)\n            if m:\n                version = m.group(1)\n                break\n    if not version:\n        raise RuntimeError(\"Cannot find version information\")\n    return version\n\n\ndef read(fname):\n    with open(fname) as fp:\n        content = fp.read()\n    return content\n\n\nsetup(\n    name=\"webargs\",\n    version=find_version(\"src/webargs/__init__.py\"),\n    description=(\n        \"Declarative parsing and validation of HTTP request objects, \"\n        \"with built-in support for popular web frameworks, including \"\n        \"Flask, Django, Bottle, Tornado, Pyramid, webapp2, Falcon, and aiohttp.\"\n    ),\n    long_description=read(\"README.rst\"),\n    author=\"Steven Loria\",\n    author_email=\"sloria1@gmail.com\",\n    url=\"https://github.com/marshmallow-code/webargs\",\n    packages=find_packages(\"src\"),\n    package_dir={\"\": \"src\"},\n    install_requires=[\"marshmallow>=3.0.0\"],\n    extras_require=EXTRAS_REQUIRE,\n    license=\"MIT\",\n    zip_safe=False,\n    keywords=(\n        \"webargs\",\n        \"http\",\n        \"flask\",\n        \"django\",\n        \"bottle\",\n        \"tornado\",\n        \"aiohttp\",\n        \"webapp2\",\n        \"request\",\n        \"arguments\",\n        \"validation\",\n        \"parameters\",\n        \"rest\",\n        \"api\",\n        \"marshmallow\",\n    ),\n    python_requires=\">=3.6\",\n    classifiers=[\n        \"Development Status :: 5 - Production/Stable\",\n        \"Intended Audience :: Developers\",\n        \"License :: OSI Approved :: MIT License\",\n        \"Natural Language :: English\",\n        \"Programming Language :: Python :: 3\",\n        \"Programming Language :: Python :: 3.6\",\n        \"Programming Language :: Python :: 3.7\",\n        \"Programming Language :: Python :: 3.8\",\n        \"Programming Language :: Python :: 3.9\",\n        \"Programming Language :: Python :: 3 :: Only\",\n        \"Topic :: Internet :: WWW/HTTP :: Dynamic Content\",\n        \"Topic :: Internet :: WWW/HTTP :: WSGI :: Application\",\n    ],\n    test_suite=\"tests\",\n    project_urls={\n        \"Changelog\": \"https://webargs.readthedocs.io/en/latest/changelog.html\",\n        \"Issues\": \"https://github.com/marshmallow-code/webargs/issues\",\n        \"Funding\": \"https://opencollective.com/marshmallow\",\n        \"Tidelift\": \"https://tidelift.com/subscription/pkg/pypi-webargs?utm_source=pypi-marshmallow&utm_medium=pypi\",  # noqa\n    },\n)\n", "path": "setup.py"}]}