Fix some string type issues involving hosting service headers.

Review Request #10824 — Created Jan. 13, 2020 and submitted — Latest diff uploaded

Information

Review Board
release-4.0.x

Reviewers

The GitHub implementation was assuming use of byte strings for headers,
as that's what urllib2 wants on Python 2. On Python 3, however, Unicode
strings are used. This means we need to respect the native string type
on both versions.

This change updates the GitHub code to use native string types when
dealing with headers, and updates the tests as well.

It also fixes the type check in HostingServiceHTTPResponse, so that we
catch these problems everywhere.

Unit tests pass on Python 2.x and 3.x.

Commits

Files

    Loading...