fix content length when posting via curl