I am developing a site comprising Spyce, PHP4, and Python2.3 running on
Apache 2, in the default
apache2triad 1.2.2 configuration. One of my web apps is written in SVG,
using the Adobe SVG Viewer 3.0 plugin,
which can POST data to a server, but does not use typical HTML <form>
I am able to POST SVG data from the plugin to a PHP4 handler that
(The data is sent to Spyce as 'text/plain', but is later to be processed
by a Python XML handler. Changing
mimetype and encoding flags has had no effect.) But when I attempt to
post the same data to
a Spyce handler, none of the built-in POST methods receive any data
(presumably because the Adobe
plugin does not use HTML <form> syntax with named input tags). Spyce
reads the HTTP headers
and populates its environment method env(), and even knows that the
method is POST, but the data
Using a Perl cgi-reflector utility I have confirmed that the Adobe
plugin is indeed posting data to 'sys.stdin',
as implied by PHP's receipt into $HTTP_RAW_POST_DATA, but I have been
unable to access it via Spyce.
When I attempt, in Spyce,
strlength = int(request.getHeader('Content-Length'))
silkstr = sys.stdin.read(strlength)
the system hangs until I shut down the Apache server, and then my client
says that it received an 'empty'
My question: How can Spyce grab the raw POST data sent from the Adobe
SVG plugin so that I can relay it
to my Python processing script?
Here are the pending environment variables during one such POSTing
(strings are truncated to 40 chars).
HTTP_USER_AGENT::Mozilla/4.0 (compatible; MSIE 6.0; Windo
SERVER_SIGNATURE::<address>Apache/2.0.49 (Win32) PHP/4.3.6
SERVER_SOFTWARE::Apache/2.0.49 (Win32) PHP/4.3.6 mod_pyth
Any assistance will be greatly appreciated. Otherwise I'll have to
resort to a horribly inefficient kludge in
handing off the data from PHP to Python!