Thanks Jonathan, but it does not work the way I use it (mod_python):
req = request._api.getRequest()
It prints nothing. If I use the Spyce standalone server, the script
freezes - seems req.read() blocks. How do I read the raw data from the
request in a mod_python environment?
----- Original Message -----
From: "Jonathan Ellis" <jonathan@...>
To: "Lars Eriksen" <downgrade@...>; "Spyce Users"
Sent: Tuesday, December 06, 2005 6:56 PM
Subject: Re: [Spyce-users] [Raw] post data
> On Tue, 6 Dec 2005 18:07:08 +0100, "Lars Eriksen" <downgrade@...>
>> It seems to be more difficult than accessing a simple variable like in
>> There should be a method "body(...)" complementing "getHeader(...)" as
>> of the request module.
>> I wrote an extremely simple and lightweight RPC-protocol on top of HTTP
>> don't want to use multi part form data encoding to send data to a .spy
>> script - and url encoded data seems extremely inefficient considering my
>> data is zlib-compressed.
>> I've created the PHP equivalent before and it turned out to work
>> flawlessly - no need for any fancy encoding.
>> I've read another post in the list's archive, someone else had trouble
>> retrieving the raw post (body) data - and IIRC he did not have the luxury
>> using a "proper" encoding. Unfortunately no one replied.
>> So how do you do it?
> Well, the Right Thing to do is clearly to have your library do a proper
> POST that spyce could process normally. (And this isn't hard to do with
> the python urllib/urllib2 modules, either.)
> But if you really want to kludge it like this, import the request module
> and read from the file-like object returned by
> C++ is history repeated as tragedy. Java is history repeated as
> arce. --Scott McKay