AW: [Zope] POST with Content-Type : text/plain fails
"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 Armin
"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
[Krone, Armin]
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?
Fix the server or use GET requests instead of POST. Cheers, Tom P
participants (3)
-
Hannu Krosing -
Krone, Armin -
Thomas B. Passin