httpclient: move code for sending the request body to a separate function

fix http parser error when it ran out of data

(0) -300 -100 -30 -10 -2 +2 +10 +30 tip

mercurial