I am using flash.net.Socket to write HTTP requests and receive HTTP responses. I'm using Tomcat Digest Authorization and everything works fine for logging in and retrieving data. However, any request that requires parameters does not work. I am using Ethereal to sniff a valid requests and trying to get mine to match, however it just does not work. Perhaps because I am sending plain text whereas a normal HTTP request encodes the params....anyone see anything wrong with this?:
POST /xmsv2/api/usermgmt/createUser.cmd HTTP/1.0 Host: www.example.com Authorization: Digest username="dev", realm="myapp", nonce="e0cc32f1f78566187e90a49547ec07f8", uri="/admin/createUser.cmd", qop=auth, nc=2, cnonce="0a4f113b", response="aecf8d679c507f1d194db5463b0c1695", opaque="217361470610c797d3e04ab317280cc5" Content-Type: text/plain username=aaa&firstName=a&lastName=aa&password=a&emailAddress=aaa After each line is \r\n and the last line has \r\n\r\n This request above actually hangs and the server never receives it. If I move the "Authorization: Digest ..." header BELOW the last line of parameters, then the request goes through, but the server never receives any of the data. In a normal HTTP POST, the parameters are in Line-based text data as "application/x-www-form-urlencoded" with the values set as I have them above. But I don't know how to send it to what the server expects. Any help is greatly appreciated.