Hi,
what is the desired behaviour if tomcat 4.1.29 rejects incoming requests because of maxProcessors reached?
Should tomcat return an empty http header?
To simulate the expected load on tomcat 4.1.29 I wrote a java client which starts conurrent threads accessing the web resource:
... HttpURLConnection connection; URL request; InputStream input; ... connection = (HttpURLConnection)request.openConnection(); input = connection.getInputStream(); ...
When getting the input-stream out of the connection an IOException is thrown if maxProcessors is reached.
That seams ok for me, but how can a client determine if a "real" exception occured or the server rejected a connection?
I tried to look into the http-header of the connection:
...
Map headerFields;
...
connection = (HttpURLConnection)request.openConnection();
headerFields = connection.getHeaderFields();
...
But the header does not contain any fields ... an empty Map is returned.
Is it really the desired behavior of a server to return an empty header or shouldn't it better return at least an response code indication the rejected request?
I think a client should at least be able to call:
...
int responseCode = connection.getResponseCode();
...
to evaluate the response code - but if the header contains no fields, an IOException is thrown also.
Bye.
smime.p7s
Description: S/MIME Cryptographic Signature