All, I just started using WebWare. I'm in the process of converting an application that I wrote for Python on IIS using the Python/ASP integration. I like what I see in Webkit so far, and the PSP implementation is making it pretty quick to move my asp pages over, since it's so similar. The bulk of my code was not in ASP, it's in plain python modules, so that helped (but I did briefly try moving this over to Zope, and that was going nowhere fast). There are a couple of things I have a question about however.
In HTTPRequest.__init__, there's a bunch of code that set's up the request data, in particular the initialization of the fields from self._input. The problem is that the code assumes the incoming Content-type is application/x-www-form-urlencoded, although it doesn't explicity check that is the case. If the incoming data has a different content type, the data is lost once the self._input stream is passed to FieldStorage.FieldStorage becase it consumes the stream. You can see two special cases for 'text/xml' and 'text/python/pickled/dict' that do something with self._input before FieldStorage gets to it, but it's not a very extensible method of doing things. There aren't any places in that __init__ method to dispatch different handlers based on content-type, so even sublcassing is going to duplicate a lot of code. It looks like there might have been some thoughts about giving access to the original request through rawRequest, but I don't see where HTTPRequest._rawRequest is actually set. BTW, the reason for all this is that my application is a client and/or server for some web services type operations that are not form encoded (or in xml... else I could have used xmlInput). I need to be able to access the POSTed data because it might be MIME encoded, newline delimeted name-value (like java properties file), etc. In IIS/ASP land, I was just using the Request.Form() (no parameters) to grab the data. Another wrinkle is that in early stages of this, I wasn't even able to rely on the content-type being set, so I had to read in the POST data and figure out the format being used through various rules. It's easy enough for me to add some code to HTTPRequest for now, but seems like there should be a more general solution. Regards, Chris Prinos _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
