[Httpunit-develop] Problem Posting -- additional documentation
Brought to you by:
russgold
From: John D. <joh...@us...> - 2001-12-08 02:12:17
|
<br><font size=2 face="sans-serif">I wrote a socket server that reports back all data that it is sent. Essentially its a reflector. Below I am pasting the results from two requests. The first is from the browser. The second is from httpunit.</font> <br><font size=2 face="sans-serif">---------------------------------------------------------------------------------------------------------------</font> <br><font size=2 face="sans-serif"><b>From the browser:</b></font> <br> <br><font size=2 face="Arial">POST /test/reflect HTTP/1.1</font> <br><font size=2 face="Arial">Accept: image/gif, image/x-xbitmap, image/jpeg, image/p</font> <br><font size=2 face="Arial">excel, application/msword, application/vnd.ms-powerpoin</font> <br><font size=2 face="Arial">Referer: http://desmond.techout.com/test/joanjett.jsp</font> <br><font size=2 face="Arial">Accept-Language: en-us</font> <br><font size=2 face="Arial">Content-Type: application/x-www-form-urlencoded</font> <br><font size=2 face="Arial">Accept-Encoding: gzip, deflate</font> <br><font size=2 face="Arial">User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows</font> <br><font size=2 face="Arial">Host: 64.59.203.117</font> <br><font size=2 face="Arial">Content-Length: 54</font> <br><font size=2 face="Arial">Connection: Keep-Alive</font> <br> <br><font size=2 face="Arial">username=rr&password=rrrrrrfsafasf&submitButton=Submit</font> <br> <br><font size=2 face="sans-serif">-------------------------------------------------------------------------------------------------------------</font> <br><font size=2 face="sans-serif"><b>From httpunit:</b></font> <br> <br><font size=2 face="Arial">POST /test/reflect HTTP/1</font> <br><font size=2 face="Arial">Content-type: application/x-www-form-urlencoded; charset=iso-8859-1</font> <br><font size=2 face="Arial">User-Agent: Java1.2.2</font> <br><font size=2 face="Arial">Host: 64.59.203.117</font> <br><font size=2 face="Arial">Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2</font> <br><font size=2 face="Arial">Content-length: 34</font> <br> <br><font size=2 face="sans-serif">--------------------------------------------------------------------------------------------------------------</font> <br><font size=2 face="sans-serif">Notice how the parameters are not being sent by httpunit. I think this validates that my code is incorrect.</font> <br> <br><font size=2 face="sans-serif">The httpunit code is posted below...Any help on this is greatly appreciated. I really like httpunit and would love to get this working and really understand where I am going wrong.</font> <br> <br><font size=2 face="sans-serif">Regards,</font> <br> <br><font size=2 face="sans-serif">John D'Esposito<br> fone: 732-922-9697<br> smtpmail: joh...@us...</font> |