[Zope] POST with Content-Type : text/plain fails
Krone, Armin
armin.krone@telecash.de
Wed, 10 Oct 2001 11:05:53 +0200
Hello everybody,
I want to connect a external server to Zope. This server talks t Zope via
simple http-requests. The connection fails at Zope if I use the
'Content-Type: text/plain' from my external server. The identical connection
with 'Content-Type: application/x-www-form-urlencoded' is successful.
example 1:
- Open Socket-Connection to localhost:8080
'POST /GetOrderInfo HTTP/1.0
Content-Type : application/x-www-form-urlencoded
Content-Length: 17
Cache-Control: no-cache
TransactionID=123'
-> Works fine, calls GetOrderInfo at Zope and returns the results
example 2:
- Open Socket-Connection to localhost:8080
'POST /GetOrderInfo HTTP/1.0
Content-Type : text/plain
Content-Length: 17
Cache-Control: no-cache
TransactionID=123'
-> 'HTTP/1.0 400 Bad Request
Server: Zope/(Zope 2.4.1 (binary release, python 2.1, win32-x86), python
2.1.0, win32) ZServer/1.1b1
Date: Fri, 05 Oct 2001 14:13:03 GMT
Bobo-Exception-File:
C:\5CPROGRA~1\5CTelecash\5Clib\5Cpython\5CPublisher\5CHTTPResponse.py
Content-Type: text/html
Bobo-Exception-Type: Bad Request
Connection: close
Bobo-Exception-Value: bobo exception
Content-Lenght: 1972
Bobo-Exception-Line: 562
(* some HTML-Code *)
...
<P><STRONG>Invalid request</STRONG></P>
The parameter, <em>TransactionID</em>, was omitted from the request.
<p>Make sure th specify all required parameters
...
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?
Best Regards
Armin Krone
Telecash GmbH