|
From: Steven N. <ste...@th...> - 2003-03-17 15:19:05
|
Right now, the assignment: self.rfile=CherryFileObject(self.connection, 'rb', self.rbufsize) takes place in the setup method of CherryHTTPRequestHandler. I don't have any idea how to wrap that in a try: block linked to the xmlrpc processing without rewriting a whole bunch of stuff. I'm confident it can be done more simply, but I just can't see it yet. If I check in my changes so far, do you have time to take a look at this? On Mon, 2003-03-17 at 06:22, Remi Delon wrote: > > Because xml-rpc comes over HTTP, it's difficult to make assumptions...I > > think. I think we should be able to count on an xml-rpc client sending > > 'text/xml' as the content-type. The next question would be, can we count > > on web browsers to never sent 'text/xml' as the content-type? I'm > > willing to make that assumption. :) > > Well, I hadn't noticed that XML-RPC clients were sending content-type in the > request. > > I think that your first assumtion is quite safe. > The spec says: > "A User-Agent and Host must be specified. > The Content-Type is text/xml. > The Content-Length must be specified and must be correct." > > So even though it doesn't use the word "must" for "Content-Type", I think we > can reasonably assume the the Content-Type will always be there and it will > always contain "text/xml". > > > But your second assumption (that other clients never send a Content-Type > with "text/xml") seems quite dangerous. Besides, remember that CherryPy > could potentially support other protocols in the future, which may also be > using "text/xml" for the content-type ... > > So I think that we should stick to the previous method (try to parse the > request body as an XML-RPC request and handle it as a regular web request if > it fails). > > Remi. > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by:Crypto Challenge is now open! > Get cracking and register here for some mind boggling fun and > the chance of winning an Apple iPod: > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en > _______________________________________________ > Cherrypy-devel mailing list > Che...@li... > https://lists.sourceforge.net/lists/listinfo/cherrypy-devel > |