The ideal solution to this problem would have been to properly sanitize input so that admins couldn't accidentally put trailing/leading spaces in URLs to follow, but this is in production now and FChannel doesn't have any system for database migration/versioning.
So instead we can just sanitize it in the http.NewRequest to avoid a panic. Other instances of http.NewRequest that use user input could probably benefit from this too but I didn't want to go off the rails and break anything without a test suite.
The ideal solution to this problem would have been to properly sanitize input so that admins couldn't accidentally put trailing/leading spaces in URLs to follow, but this is in production now and FChannel doesn't have any system for database migration/versioning. So instead we can just sanitize it in the http.NewRequest to avoid a panic. Other instances of http.NewRequest that use user input could probably benefit from this too but I didn't want to go off the rails and break anything without a test suite.
Fix for issue #58