Rewrite parse_header() for Python 2/3
Rewrite parse_header() for Python 2/3

The parse_header() function does not work with Python 3 because it mixes
str and bytes and uses the non-existent unicode().

Rewrite the function so it works for both Python 2 and 3.  Also drop the
catch-all exception handler that hides the details when something goes
wrong.  Exceptions are not expected in this code.

Reported-by: Fabiano Fidêncio <d95e9796398a6087d3fb67947e5776c26b264733@fidencio.org>
Cc: Fam Zheng <3fda8cf018b542f405493d78ea980b2545014644@euphon.net>
Signed-off-by: Stefan Hajnoczi <484520986196e4a799496429ce8a499eb6488adb@gmail.com>

stefanha/git-publish,stefanha/git-publish