Fix default value for a header

This code specified None as the default value, but it would raise an
exception if that was ever returned.  An empty string causes the code to
work as intended.

This came up while I was writing a unit test for another bug fix.

Change-Id: I658bb8a9b5124f281988fb60b645182ea0ccf99f
Related-bug: #1231524
Fix getting header in redirect processing

The code for processing an HTTP redirect included an incorrect method of
getting the Location header from an HTTPResponse.  It needs to use the
getheader() method on the response, instead.  This patch fixes that and
includes a unit test that covers this code path.

Change-Id: I0952fabad581b020dee07bdc4007b55b47c906aa
Closes-Bug: #1231524
Fix regression bug after removing posixpath in http.py

After removing posixpath.normpath(url) in http.py, the code has a
regression bug that the url like 'http://example.com:80/test' can
not work. The code urlparse.urljoin() can not work as '%s%s' %
(self.endpoint_path, url).

Fixes bug #1230032

Change-Id: Ie7266fc3a067b92dfeed169086b4bf6a87dedbd6
Fix misused assertTrue in unit tests

Refactored unit tests to use assertEqual instead of assertTrue
where needed.

Closes-Bug: #1226374

Change-Id: I5f3b582e19f3461a04b5df05960095779ec8aa1a
Merge "Fix default value for a header"
Merge "Fix getting header in redirect processing"
Merge "Fix regression bug after removing posixpath in http.py"