DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=32292>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=32292 ------- Additional Comments From [EMAIL PROTECTED] 2004-12-08 09:21 ------- Thank you for your reply. I can understand that the response 505 and the connection should be Keep-Alive are not wrong in this matter. but the problem is altough the response said "Connection: Keep-Alive" the real connection is closed after the response. In regarding to this matter I think there are 2 problems. 1. Regarding to "HEAD /index.html HTTP/1.0" response I think it is better to response with 400 rather than 505 (there are 2 spaces after URI so I think it is a Bad Request) 2. Regarding to "HEAD /index.html HTTP/1.2" response I think it is better to response with 505 but the Socket should not be closed immediately So I think to try to solve the problems with 1) for number 1 solution org.apache.coyote.http11.Http11Processor#prepareRequest() (line No.1090) ----------------- protected void prepareRequest() { http11 = true; http09 = false; contentDelimitation = false; expectation = false; if (sslSupport != null) { request.scheme().setString("https"); } MessageBytes protocolMB = request.protocol(); if (protocolMB.equals(Constants.HTTP_11)) { http11 = true; protocolMB.setString(Constants.HTTP_11); } else if (protocolMB.equals(Constants.HTTP_10)) { http11 = false; keepAlive = false; protocolMB.setString(Constants.HTTP_10); } else if (protocolMB.equals("")) { // HTTP/0.9 http09 = true; http11 = false; keepAlive = false; // ********** FIX FROM ********** } else if (!protocolMB.startsWith("HTTP/")) { error = true; // 400 - Bas request response.setStatus(400); // ********** FIX TO ********** } else { // Unsupported protocol http11 = false; error = true; // Send 505; Unsupported HTTP version response.setStatus(505); } .... ----------------- 2) for number 2 solution org.apache.coyote.http11.Http11Processor#prepareResponse() (line No.1530) ----------------- protected void prepareResponse() { boolean entityBody = true; contentDelimitation = false; ... // If we know that the request is bad this early, add the // Connection: close header. keepAlive = keepAlive && !statusDropsConnection(statusCode); if (!keepAlive) { response.addHeader("Connection", "close"); } else if (!http11) { response.addHeader("Connection", "Keep-Alive"); // ********** FIX FROM ********** error=false; // ********** FIX TO ********** } ... ----------------- regards, Naru Hayashi from Japan -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]