W3C home > Mailing lists > Public > www-jigsaw@w3.org > September to October 1997

JigsawHttpServletResponse.setHeader()

From: Payam Mirrashidi <payam@netmosphere.com>
Date: Mon, 08 Sep 1997 15:34:22 -0700
Message-ID: <34147D6E.7471218B@netmosphere.com>
To: www-jigsaw@w3.org
I'm having a strange problem with JigsawHttpServletResponse setHeader() method.
For some reason, its not working for me in a very obvious case. I can't
seem to do a setHeader for "Set-Cookie". The result of the following class is:
"Set-Cookie=false". Am I going about this wrong? Making wrong assumptions
about what I can and can not set? This works with srun and I'm trying to figure
out what behaviour I'm depending on so that it doesn't work with jigsaw.

I traced through the code that does this and noticed that the lower level
implementation
does a toLowerCase() on the keys being added. Could this be the cause of the
problem?




import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;

public class tester extends HttpServlet {
  protected void doGet (HttpServletRequest req, HttpServletResponse res)
       throws ServletException, IOException
    {
      res.setContentType("text/html");
      res.setHeader("Set-Cookie","TONE=BASS");
      boolean contains = res.containsHeader("Set-Cookie");

res.getOutputStream().print("<HTML><BODY>Set-Cookie="+contains+"</BODY></HTML>");

    }
}


--
Payam Mirrashidi                Netmosphere, Inc.
Tel: (415) 655-4757             1730 S. Amphlett Blvd.  Suite 123
Fax: (415) 655-2032             San Mateo, CA  94403
mailto:payam@netmosphere.com    http://www.netmosphere.com
Received on Monday, 8 September 1997 18:35:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:26 GMT