title: commandline curl POST gives zero content length
body: <p>I'm using commandline curl to do a POST via a proxy but my form data is vanishing to zero content length. Any ideas what I'm doing wrong?</p>
  
  <p>Here's my command line (uses a public test form so others can try it):</p>
  
  <p><code>curl -v --proxy-ntlm --proxy proxyserver:proxyport --proxy-user : -d "fname=a&amp;lname=b" http://www.snee.com/xml/crud/posttest.cgi</code></p>
  
  <p>-v = verbose<br>
  next few arguments get us through the proxy using windows authentication<br>
  -d = should do a post with the given arguments</p>
  
  <p>However, both the response and the verbose print out suggest the form content is vanishing. The curl prints "Content-Length: 0" and the returned html has both arguments missing and a content length of 0.</p>
  
  <p>The bug doesn't seem to be in the proxy server as curl admits it is sending a content length of 0. Does anyone know a solution to this problem? Has anyone else seen it?</p>
  
  <p><strong>Update</strong>: <a href="http://curl.haxx.se/mail/archive-2009-03/0013.html" rel="nofollow noreferrer">this person</a> appears to have the same bug, but no solution suggested, apart from not using ntlm which I have to</p>
  
  <p><strong>Update 2</strong>: This definitely only happens with NTLM authentication, I've tried an alternative authentication method which works. Also, using -F instead of -d (for binary form data) fails in the same way.</p>
  
  <p><strong>Update 3 (workaround)</strong>: I've had a bit of discussion on the curl-users list about this. A workaround was provided which is to use --proxy-anyauth instead of --proxy-ntlm. I'm still investigating the problem but this workarounf works for me.</p>