Make sure buffer is zero-terminated when getting external ip

Also switch to HTTP 1.0 to avoid chunked transfer coding.