httputil: don't set Content-Type until we're sure

Fixes Issue 182

Change-Id: I1a687c51b60caca5ddc7b4cd21d4f7efa6342248
httputil: rename conn to rw, per current conventions

Change-Id: Ifc39915396f5ababdc2fb21c2a95156bbbf729c8