Hi Björn,

I think, the problem is the content-type, you're using. It is set to "text/xml", but you don't send correct XML. The error messages seems also to be sent by some SOAP framework.

Try sending some correct XML data.


Best regards,

Markus

Am 20.06.2014 12:58, schrieb Björn Höfling:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

summary of my Problem:

When a client POSTs with Tranfer-Encoding:chunked,
my server is not processing the request.

Full details:

I have an Apache 2.2.10 connected via AJP to a Tomcat 8.0.3 (Java
1.7.x) or Tomcat 6.0.18 (Java 1.6.x) (I change the AJP worker port to
switch between the two Tomcats).

Then I send the following request:

telnet myapache 80
Trying a.b.c.d ...
Connected to myapache
Escape character is '^]'.
POST /my/webservice HTTP/1.1
Authorization: Basic xyz=
Content-Type: text/xml; charset=utf-8
Transfer-Encoding: chunked
User-Agent: telnet/abc
Host: myapache
Accept: text/html, image/gif, image/jpeg, */*; q=.2

4
xxxx
0


With the Tomcat 6, I see the follwing response, which is quite
correct, because I did sent garbage and no valid xml to the Server:


HTTP/1.1 500 Internal Server Error
Date: Fri, 20 Jun 2014 09:22:37 GMT
Server: Apache
Content-Length: 472
Connection: close
Content-Type: text/xml;charset=utf-8

<?xml version='1.0' encoding='UTF-8'?><S:Envelope
xmlns:S="http://schemas.xmlsoap.org/soap/envelope/";><S:Body><S:Fault
xmlns:ns4="http://www.w3.org/2003/05/soap-envelope";><faultcode>S:Client</faultcode><faultstring>Couldn't
create SOAP message due to exception: XML reader error:
com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character 'x'
(code 120) in prolog; expected '&lt;'

at [row,col {unknown-source}]:
[1,1]</faultstring></S:Fault></S:Body></S:Envelope>Connection to
myapache closed by foreign host.

AJP is in both instances configured via

<Connector port="xxx" redirectPort="yyy" enableLookups="false"
protocol="AJP/1.3">
...
</Connector>

changing Protocol to "org.apache.coyote.ajp.AjpProtocol" did not
change anything.



When I try the same with Tomcat 8 connected, I don't get anything back
from the Server. Instead, it waits indefinitely (expecting me to send
something?).

When I sent the request with a Conten-Length: header instead of
Transfer-Encoding:chunked, I get a proper server-response.

As I use the same Apache frontend and just change the Tomcat backend,
I suspect the problem there. Though I'm not sure if this is a Tomcat
error or a configuration problem, or a Java-version problem.


I have little experience with the HTTP protocol, until now, it just
worked and I didn't care :-)

I searched the Internet for similar problems but could only find
either ones where fixed had been introduced into Tomcat 7.x and/or
where the problem was with server _response_.


Do you have any ideas what's wrong here, where the error might be or
how I can better understand it?


Thanks for your help,

Björn




-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlOkE9EACgkQvyhstlk+X/1ZiQCbB/mCxoL3Ypo+Ter1ZJF951da
EmYAn1V4KoC7/EEZ08M4xUjIOJj2/Lkc
=u92T
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



--
Mit freundlichen Grüßen

Markus Dörschmidt
Software-Entwickler
------------------------------------------------------------------------

Markus Dörschmidt, m...@agnitas.de
Fon: 089/552908-49, Fax: -69,


<http://www.agnitas.de>   *AGNITAS AG - e-mail & marketing automation*
Werner-Eckert-Straße 6, 81829 München
*www.agnitas.de* <http://www.agnitas.de>



Vorstand: Martin Aschoff, Helmut Kunkel, Robert Pietsch
Vorsitzender des Aufsichtsrats: Dr. Reinhard Gaertner
Registergericht München, HRB-Nummer 126 104, USt-IdNr. DE 201 88 33 28

<http://www.agnitas.de/email>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to