We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
reset.css doesn't load sometimes
@clone1018 saw this when we first started caching static assets. It's why I turned off static caching initially. Now static caching is back with #1245 and indeed we're seeing this again. :(

![2013-08-06_11-47-55](https://f.cloud.github.com/assets/134455/931202/acae7e70-0026-11e3-8624-91825c6e8726.png)


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `gittip/cache_static.py`
Content:
```
1 """
2 Handles caching of static resources.
3 """
4 import os
5 from calendar import timegm
6 from email.utils import parsedate
7 from wsgiref.handlers import format_date_time
8 
9 from aspen import Response
10 
11 
12 def version_is_available(request):
13     """Return a boolean, whether we have the version they asked for.
14     """
15     path = request.line.uri.path
16     version = request.website.version
17     return path['version'] == version if 'version' in path else True
18 
19 
20 def version_is_dash(request):
21     """Return a boolean, whether the version they asked for is -.
22     """
23     return request.line.uri.path.get('version') == '-'
24 
25 
26 def get_last_modified(fs_path):
27     """Get the last modified time, as int, of the file pointed to by fs_path.
28     """
29     return int(os.path.getctime(fs_path))
30 
31 
32 def inbound(request):
33     """Try to serve a 304 for resources under assets/.
34     """
35     uri = request.line.uri
36 
37     if not uri.startswith('/assets/'):
38 
39         # Only apply to the assets/ directory.
40 
41         return request
42 
43     if version_is_dash(request):
44 
45         # Special-case a version of '-' to never 304/404 here.
46 
47         return request
48 
49     if not version_is_available(request):
50 
51         # Don't serve one version of a file as if it were another.
52 
53         raise Response(404)
54 
55     ims = request.headers.get('If-Modified-Since')
56     if not ims:
57 
58         # This client doesn't care about when the file was modified.
59 
60         return request
61 
62     if request.fs.endswith('.spt'):
63 
64         # This is a requests for a dynamic resource. Perhaps in the future
65         # we'll delegate to such resources to compute a sensible Last-Modified
66         # or E-Tag, but for now we punt. This is okay, because we expect to
67         # put our dynamic assets behind a CDN in production.
68 
69         return request
70 
71 
72     try:
73         ims = timegm(parsedate(ims))
74     except:
75 
76         # Malformed If-Modified-Since header. Proceed with the request.
77 
78         return request
79 
80     last_modified = get_last_modified(request.fs)
81     if ims < last_modified:
82 
83         # The file has been modified since. Serve the whole thing.
84 
85         return request
86 
87 
88     # Huzzah!
89     # =======
90     # We can serve a 304! :D
91 
92     response = Response(304)
93     response.headers['Last-Modified'] = format_date_time(last_modified)
94     response.headers['Cache-Control'] = 'no-cache'
95     raise response
96 
97 
98 def outbound(response):
99     """Set caching headers for resources under assets/.
100     """
101     request = response.request
102     website = request.website
103     uri = request.line.uri
104 
105     version = website.version
106     response.headers['X-Gittip-Version'] = version
107 
108     if not uri.startswith('/assets/'):
109         return response
110 
111     response.headers.cookie.clear()
112 
113     if response.code == 304:
114         return response
115 
116     if website.cache_static:
117 
118         # https://developers.google.com/speed/docs/best-practices/caching
119         response.headers['Cache-Control'] = 'public'
120         response.headers['Vary'] = 'accept-encoding'
121 
122         if 'version' in uri.path:
123             # This specific asset is versioned, so it's fine to cache it.
124             response.headers['Expires'] = 'Sun, 17 Jan 2038 19:14:07 GMT'
125         else:
126             # Asset is not versioned. Don't cache it, but set Last-Modified.
127             last_modified = get_last_modified(request.fs)
128             response.headers['Last-Modified'] = format_date_time(last_modified)
129
```
--- 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/gittip/cache_static.py b/gittip/cache_static.py
--- a/gittip/cache_static.py
+++ b/gittip/cache_static.py
@@ -111,6 +111,10 @@
     response.headers.cookie.clear()
 
     if response.code == 304:
+
+        # https://github.com/gittip/www.gittip.com/issues/1308
+        del response.headers['Content-Type']
+
         return response
 
     if website.cache_static:

{"golden_diff": "diff --git a/gittip/cache_static.py b/gittip/cache_static.py\n--- a/gittip/cache_static.py\n+++ b/gittip/cache_static.py\n@@ -111,6 +111,10 @@\n     response.headers.cookie.clear()\n \n     if response.code == 304:\n+\n+        # https://github.com/gittip/www.gittip.com/issues/1308\n+        del response.headers['Content-Type']\n+\n         return response\n \n     if website.cache_static:\n", "issue": "reset.css doesn't load sometimes\n@clone1018 saw this when we first started caching static assets. It's why I turned off static caching initially. Now static caching is back with #1245 and indeed we're seeing this again. :(\n\n![2013-08-06_11-47-55](https://f.cloud.github.com/assets/134455/931202/acae7e70-0026-11e3-8624-91825c6e8726.png)\n\n", "before_files": [{"content": "\"\"\"\nHandles caching of static resources.\n\"\"\"\nimport os\nfrom calendar import timegm\nfrom email.utils import parsedate\nfrom wsgiref.handlers import format_date_time\n\nfrom aspen import Response\n\n\ndef version_is_available(request):\n    \"\"\"Return a boolean, whether we have the version they asked for.\n    \"\"\"\n    path = request.line.uri.path\n    version = request.website.version\n    return path['version'] == version if 'version' in path else True\n\n\ndef version_is_dash(request):\n    \"\"\"Return a boolean, whether the version they asked for is -.\n    \"\"\"\n    return request.line.uri.path.get('version') == '-'\n\n\ndef get_last_modified(fs_path):\n    \"\"\"Get the last modified time, as int, of the file pointed to by fs_path.\n    \"\"\"\n    return int(os.path.getctime(fs_path))\n\n\ndef inbound(request):\n    \"\"\"Try to serve a 304 for resources under assets/.\n    \"\"\"\n    uri = request.line.uri\n\n    if not uri.startswith('/assets/'):\n\n        # Only apply to the assets/ directory.\n\n        return request\n\n    if version_is_dash(request):\n\n        # Special-case a version of '-' to never 304/404 here.\n\n        return request\n\n    if not version_is_available(request):\n\n        # Don't serve one version of a file as if it were another.\n\n        raise Response(404)\n\n    ims = request.headers.get('If-Modified-Since')\n    if not ims:\n\n        # This client doesn't care about when the file was modified.\n\n        return request\n\n    if request.fs.endswith('.spt'):\n\n        # This is a requests for a dynamic resource. Perhaps in the future\n        # we'll delegate to such resources to compute a sensible Last-Modified\n        # or E-Tag, but for now we punt. This is okay, because we expect to\n        # put our dynamic assets behind a CDN in production.\n\n        return request\n\n\n    try:\n        ims = timegm(parsedate(ims))\n    except:\n\n        # Malformed If-Modified-Since header. Proceed with the request.\n\n        return request\n\n    last_modified = get_last_modified(request.fs)\n    if ims < last_modified:\n\n        # The file has been modified since. Serve the whole thing.\n\n        return request\n\n\n    # Huzzah!\n    # =======\n    # We can serve a 304! :D\n\n    response = Response(304)\n    response.headers['Last-Modified'] = format_date_time(last_modified)\n    response.headers['Cache-Control'] = 'no-cache'\n    raise response\n\n\ndef outbound(response):\n    \"\"\"Set caching headers for resources under assets/.\n    \"\"\"\n    request = response.request\n    website = request.website\n    uri = request.line.uri\n\n    version = website.version\n    response.headers['X-Gittip-Version'] = version\n\n    if not uri.startswith('/assets/'):\n        return response\n\n    response.headers.cookie.clear()\n\n    if response.code == 304:\n        return response\n\n    if website.cache_static:\n\n        # https://developers.google.com/speed/docs/best-practices/caching\n        response.headers['Cache-Control'] = 'public'\n        response.headers['Vary'] = 'accept-encoding'\n\n        if 'version' in uri.path:\n            # This specific asset is versioned, so it's fine to cache it.\n            response.headers['Expires'] = 'Sun, 17 Jan 2038 19:14:07 GMT'\n        else:\n            # Asset is not versioned. Don't cache it, but set Last-Modified.\n            last_modified = get_last_modified(request.fs)\n            response.headers['Last-Modified'] = format_date_time(last_modified)\n", "path": "gittip/cache_static.py"}], "after_files": [{"content": "\"\"\"\nHandles caching of static resources.\n\"\"\"\nimport os\nfrom calendar import timegm\nfrom email.utils import parsedate\nfrom wsgiref.handlers import format_date_time\n\nfrom aspen import Response\n\n\ndef version_is_available(request):\n    \"\"\"Return a boolean, whether we have the version they asked for.\n    \"\"\"\n    path = request.line.uri.path\n    version = request.website.version\n    return path['version'] == version if 'version' in path else True\n\n\ndef version_is_dash(request):\n    \"\"\"Return a boolean, whether the version they asked for is -.\n    \"\"\"\n    return request.line.uri.path.get('version') == '-'\n\n\ndef get_last_modified(fs_path):\n    \"\"\"Get the last modified time, as int, of the file pointed to by fs_path.\n    \"\"\"\n    return int(os.path.getctime(fs_path))\n\n\ndef inbound(request):\n    \"\"\"Try to serve a 304 for resources under assets/.\n    \"\"\"\n    uri = request.line.uri\n\n    if not uri.startswith('/assets/'):\n\n        # Only apply to the assets/ directory.\n\n        return request\n\n    if version_is_dash(request):\n\n        # Special-case a version of '-' to never 304/404 here.\n\n        return request\n\n    if not version_is_available(request):\n\n        # Don't serve one version of a file as if it were another.\n\n        raise Response(404)\n\n    ims = request.headers.get('If-Modified-Since')\n    if not ims:\n\n        # This client doesn't care about when the file was modified.\n\n        return request\n\n    if request.fs.endswith('.spt'):\n\n        # This is a requests for a dynamic resource. Perhaps in the future\n        # we'll delegate to such resources to compute a sensible Last-Modified\n        # or E-Tag, but for now we punt. This is okay, because we expect to\n        # put our dynamic assets behind a CDN in production.\n\n        return request\n\n\n    try:\n        ims = timegm(parsedate(ims))\n    except:\n\n        # Malformed If-Modified-Since header. Proceed with the request.\n\n        return request\n\n    last_modified = get_last_modified(request.fs)\n    if ims < last_modified:\n\n        # The file has been modified since. Serve the whole thing.\n\n        return request\n\n\n    # Huzzah!\n    # =======\n    # We can serve a 304! :D\n\n    response = Response(304)\n    response.headers['Last-Modified'] = format_date_time(last_modified)\n    response.headers['Cache-Control'] = 'no-cache'\n    raise response\n\n\ndef outbound(response):\n    \"\"\"Set caching headers for resources under assets/.\n    \"\"\"\n    request = response.request\n    website = request.website\n    uri = request.line.uri\n\n    version = website.version\n    response.headers['X-Gittip-Version'] = version\n\n    if not uri.startswith('/assets/'):\n        return response\n\n    response.headers.cookie.clear()\n\n    if response.code == 304:\n\n        # https://github.com/gittip/www.gittip.com/issues/1308\n        del response.headers['Content-Type']\n\n        return response\n\n    if website.cache_static:\n\n        # https://developers.google.com/speed/docs/best-practices/caching\n        response.headers['Cache-Control'] = 'public'\n        response.headers['Vary'] = 'accept-encoding'\n\n        if 'version' in uri.path:\n            # This specific asset is versioned, so it's fine to cache it.\n            response.headers['Expires'] = 'Sun, 17 Jan 2038 19:14:07 GMT'\n        else:\n            # Asset is not versioned. Don't cache it, but set Last-Modified.\n            last_modified = get_last_modified(request.fs)\n            response.headers['Last-Modified'] = format_date_time(last_modified)\n", "path": "gittip/cache_static.py"}]}