Backport better HTTP logging from 55133a28eb4f798f1b09d4f1672969713ba6dfa6