2017-03-12 15:32 GMT+03:00 Marc Boorshtein <mboorsht...@gmail.com>:
> Mark & Olaf,
>
> I'm working directly with the servlet api.  Whats odd is it worked fine in
> 8.0.39.  The response is set first:
>
> https://github.com/TremoloSecurity/OpenUnison/blob/1.0.9/unison/unison-server-core/src/main/java/com/tremolosecurity/proxy/filter/PostProcess.java
> - lines 110-121
>
> Then I set the cookies and the headers:
>
> https://github.com/TremoloSecurity/OpenUnison/blob/1.0.9/unison/unison-server-core/src/main/java/com/tremolosecurity/proxy/ConfigSys.java
> line 310 -->
> https://github.com/TremoloSecurity/OpenUnison/blob/1.0.9/unison/unison-server-core/src/main/java/com/tremolosecurity/proxy/ProxyResponse.java
> line 205
>
> Finally, I'm writing the actual content:
>
> https://github.com/TremoloSecurity/OpenUnison/blob/1.0.9/unison/unison-server-core/src/main/java/com/tremolosecurity/proxy/ConfigSys.java
> line 316 --> line 515
>
> I setup traces and have verified that the codes are being set properly, the
> response isn't committed until AFTER I write the content but for some
> reason the data isn't going back to the browser (the headers aren't either
> so its not just the content).  The only thing thats sent back is the status
> code.

Status 500 means that some error happened during processing.

Is there anything in the logs? Exceptions?

Maybe the browser closes the connection by its own decision, without
reading the response? (Thus a
org.apache.catalina.connector.ClientAbortException happens. I think it
may be logged as status 500).


If I see correctly, ProxyResponse copies the headers from somewhere
(from a proxied response?).

Are those headers sane and correct?

E.g. "Transfer-Encoding: chunked" and "Content-Length" are mutually
exclusive, cannot be used at the same time, cannot be used more than
once. They should not be blindly copied.

The status code is coped from somewhere. Does it have the expected value (200)?

Is the text in those headers (and status message) correct 7-bit
US-ASCII characters?


Can this be tested with a simple browser like Curl or Wget  that can
log response headers?
Or a simple raw client (telnet, puTTY).


I do not see anything in changelog for 8.0.40-8.0.41 that could result
in such change in behaviour. Maybe configurations of the two systems
are different?

Make sure that there are no duplicate jars in WEB-INF/lib.
Sometimes building a project pulls in several copies of the same
library, and the order of jars in WEB-INF/lib is random and depends on
version of Java. Thus you won't know what version wins.

Do both systems use the same connector type (bio/nio/apr,  ajp/http/https)?


Try running WireShark, to inspect network traffic?
https://www.wireshark.org/

Try running with a debugger?
https://wiki.apache.org/tomcat/FAQ/Developing#Debugging

Best regards,
Konstantin Kolinko

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

Reply via email to