AW: [Zope] POST with Content-Type : text/plain fails
Hannu Krosing
hannu@tm.ee
Wed, 10 Oct 2001 13:03:23 +0200
"Krone, Armin" wrote:
>
> "Krone, Armin" wrote:
> >
> > The pain is, that I can't change the 'content-Type' within my external
> > server.
> > What can I do with Zope that it accepts HTML-Requests with 'Content-Type :
> > text/plain?
>
> Hannu wrote
> There is no such thing as text/plain content type for post request.
>
> What is the _real_ content type (format) of your external server ?
>
> Zope needs to know it in order to extract the data that is POSTed.
>
> The _real_ content type is plain text! The paramenters come in the mime-body
> as
> name1=value
> name2=value
And how should Zope figure that out ;)
Do you know any server that does enything reasonable with the encoding
you posted ?
To make Zope server believe that content-type text/plain means the
encoding
you described you can probably hack lib/python/ZPublisher/Client.py
around lines
180-200 to accept extra encodings in addition to standard encodings
multipart/form-data and application/x-www-form-urlencoded.
----------------
Hannu