server: Add a fallback MIME type (application/octet-stream)
authorW. Trevor King <wking@tremily.us>
Fri, 21 Feb 2014 20:16:06 +0000 (12:16 -0800)
committerW. Trevor King <wking@tremily.us>
Fri, 21 Feb 2014 20:16:06 +0000 (12:16 -0800)
commit32b8033244baf5fa400a356f7b061156d3454f45
treee6e243ea5d73bf122c1a581a4431ae95f63e6460
parent1018fbca115403bbd7cf5960036b7976c0c0e76f
server: Add a fallback MIME type (application/octet-stream)

Avoid:

  Traceback (most recent call last):
    File "/.../wsgiref/handlers.py", line 137, in run
      self.result = application(self.environ, self.start_response)
    File "/.../site-packages/package_cache/server.py", line 50, in __call__
      environ=environ, start_response=start_response)
    File "/.../site-packages/package_cache/server.py", line 69, in _serve_request
      path=cache_path, environ=environ, start_response=start_response)
    File "/.../site-packages/package_cache/server.py", line 124, in _serve_file
      start_response('200 OK', list(headers.items()))
    File "/.../wsgiref/handlers.py", line 226, in start_response
      self.headers = self.headers_class(headers)
    File "/.../wsgiref/headers.py", line 39, in __init__
      self._convert_string_type(v)
    File "/.../wsgiref/headers.py", line 46, in _convert_string_type
      " of type str (got {0})".format(repr(value)))
  AssertionError: Header names/values must be of type str (got None)

for portage-20140220.tar.xz.md5sum.
package_cache/server.py