[Zope] Re: cannot access POST content in Zope
Tres Seaver
tseaver at palladion.com
Fri Aug 17 12:22:34 EDT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Manuel Spuhler wrote:
> Hi Andreas,
>
> thank for your answer
>
>> No idea where and how you look for the uploaded content.
>> Everything in Zope is available from the REQUEST. And of course you
>> can _not_ upload something to the mutator method of some object.
>> This makes zero sense.
>> You might write your script that takes the data from the REQUEST
>> and calls the API method e.g. a mutator method.
>
> I think you misunderstood, curl send it in a form, content is not
> *uploaded* but encoded in a POST 'text/xml'
> and it's sent to a script from which which I look at
> request.RESPONSE.form, but it's empty when content-type is
> 'application/x-www-form-urlencoded'
> my problem is probably about content-type
If you are POSTing XML as the payload of your REQUEST, then the 'form'
element *must* be empty: Zope's form marshalling doesn't know what to
do with such a mess. You will need to parse REQUEST.body yourself, in
such a case.
Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 tseaver at palladion.com
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGxctK+gerLs4ltQ4RAgnrAKC1SES5XJH93fJQKf9+zIKQNs+cpwCgpdJg
hvaZBLycgNwUu8rsAMk2aFE=
=sH90
-----END PGP SIGNATURE-----
More information about the Zope
mailing list