I have a small problem interpreting the HTTP/1.1 spec in terms of
Servlets.

When implementing HTTP/1.1 persistent connections are the default
connection mode.

The correct reply to a request which is made on a socket connection
which is going to be made persistent is:

 100 - Continue.

If a servlet completes correctly it will generally assume the status
is set correctly for it (most engines as far as I know set the
response to 200 - Ok by default).

However, there is nothiong to stop a servlet from setting it's
response code to 200 .

If the server engine is implementing persistent connections then this
is an illegal response.

There are two things the server could do to avoid this, I'm not sure
which one is correct:

1. if persistent connections are in force and the servlet sets the
response to 200 the server could reset the response to 100.

2. if persistent connections are in force and the servlets sets the
response to 200 the server could accept the response code and
automatically issue a Connection: close response header on the
connection.

Of course, the reverse is also true, a servlet might set response
code 100 when it should not be set.


Anybody any ideas which of these methods would be best, or which
people would prefer from a servlet engine?

Paperclips is going through HTTP/1.1 compliance adjustments right now
and this is the biggest issue I've come across so far.





Nic Ferrier
Tapsell-Ferrier Ltd
www.tapsellferrier.co.uk

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to