Fix a couple bugs caused by passing in unicode headers to urlopen.
Review Request #8619 — Created Jan. 15, 2017 and submitted
urlopenis happy to accept a unicode object for headers, but it then tries to
use the ascii codec to encode them. If the text includes something that can't
be encoded, it would fail. This change fixes up a couple places where this was
causing problems for people.
Ran unit tests.
Tool: Pyflakes Processed Files: reviewboard/hostingsvcs/gitlab.py reviewboard/hostingsvcs/service.py Tool: PEP8 Style Checker Processed Files: reviewboard/hostingsvcs/gitlab.py reviewboard/hostingsvcs/service.py