corrected bug in getHTTPURL method