Return text/plain (not text/javascript)
Improved exception handling across httplib versions