On 31 Dec 2011, 07:22 pm, [email protected] wrote:
>Hi,
>
>[snip]
>
>If I telnet to localhost port 80 and copy and paste the following:
>
>=== BEGINNING OF WORKING INPUT TO SERVER  ===
>POST /locked/checklogin.php HTTP/1.1
>Host: www.mysite.com
>User-Agent: Mozilla/4.0
>Content-Length: 31
>Content-Type: application/x-www-form-urlencoded

I notice that in this POST, your content type is "application/x-www- 
form-urlencoded".
>
>
>myusername=john&mypassword=1234
>===== END OF WORKING INPUT TO SERVER ====
>
>[snip]
>
>==== START OF CODE MODIFIED WITH POST ===
>
>[snip]
>
>d = agent.request(
>     'POST',
>     'http://localhost/locked/checklogin.php',
>     Headers({'User-Agent': ['Mozilla 5.0'],
>         'Content-Type': ['multipart/form-data; charset=utf-8']}),
>     body)

However, with this one, you've switched to "multipart/form-data".

Perhaps this difference is the cause of the problem?

Jean-Paul

_______________________________________________
Twisted-web mailing list
[email protected]
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web

Reply via email to