[FIX] Honor custom HTTP ports

Fixes #803
Merge pull request #805 from TheSerapher/issue-803

[FIX] Honor custom HTTP ports