I have the same Servlet running in two different servers. Both servers are Linux Red Hat.
This Servlet is called by some shell scripts which receives the Servlet response and uses it to make some decisions.
The problem is: Shell Scripts are very sensitive to the different kind of break lines (LF or CRLF). In one server the output of the Servlet comes with CRLF, whereas the output of the Servlet running in the other server comes only with LF. Look:
Server 1:
0 \r \n
31 0d 0a
Server 2:
0 \n
30 0a
This is part of the Servlet code that prints the result:
Integer authorization = checkAuthorization(error_code, sat);
if(authorization != null){
out.println(authorization);
}
As you can see, I receive an Integer from a function and then I print it, only that.
What could justify those different outputs in the different servers? Is there any environment variable that controls that?