Serious tweaks to http.js to make JSDoc happy.