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=43209>.
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=43209

           Summary: HTTP Headers are corrupted with basic authentication
           Product: Tomcat 5
           Version: 5.5.23
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Unknown
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


When using basic authentication, and a custom HTTP header is added to a request
(e.g. with the modify headers Firefox plugin), then the first request in the
session will have a wrong return value of HTTPServletRequest.getHeader(String).
If the value was meant to be "abc", then "abc, abc" is returned instead.
Subsequent requests in the session give correct behaviour.

An example is the following servlet, where the HTTP request has an "xyz" header
field. Firefox with the modify headers plugin was used.

//---------------------------------------------------------------


import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class Xyz extends HttpServlet {

    public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException {
        try {
            response.getWriter().println("xyz="+request.getHeader("xyz"));
        } catch (IOException e) {
            throw new RuntimeException("IOException",e);
        }
    }

}

-- 
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]

Reply via email to