Rewind request body stream before trying to get its size

In some cases there might a glitch that AJAX requests with body payload are not proxies properly. They fully delivered to localhost, but then they got Content-Length: 0 and payload doesn't send further to remote host. I've found that it was because we try to get size of body when it's already has been read (I don't know why).

This simple patch fixes that issue.