HTTP error on receiving a form

Patrick.Bussi at space.alcatel.fr Patrick.Bussi at space.alcatel.fr
Mon Apr 22 04:58:01 EDT 2002


Hello

I am implementing a simple tool to answer post requests for automatic testing of
a Web APACHE Server (implemented by other people). It is rather easy with use of
something like:

dataOfTheForm= {"data1":"val1","data2":"val2"[...etc...]}
encodedData=urllib.urlencode(dataOfTheForm)
f=urllib.urlopen(webSite,encodedData)

However, the web server find errors in the data received from my tool, while all
is OK with a web browser. I have TCPdumped answers both from my test tool and
from an ordinary web browser (say Mozilla). As far as I could understand, the
only difference is the order in which data are encoded.

My questions:

1 - is it possible that a web Server be sensitive to the order in which data are
encoded (as they are all sent in one single IP packet)

2 - is there a quick way to encode data from a dictionnary in a specific order.


Thank you for any clue.


---
Patrick Bussi
patrick.bussi at space.alcatel.fr


Any opinions expressed are my own and not necessarily those of my Company.







More information about the Python-list mailing list