You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by John Pettit <jp...@logictier.com> on 2000/02/13 04:10:01 UTC

Any ideas about lost headers with SSL?

I'm using Tomcat 3.1M1 with an Apache 1.3.9 SSL server. I wrote a simple jsp
page to determine what headers I was getting, in an attempt to find out why
I was not getting any cookies sent back to the server, and I was getting no
headers at all (e.g. no HTTP_USER_AGENT, COOKIE, ACCEPT, etc).

Any ideas what I might be doing wrong?

Thanks for any help, I'm getting a bit desperate here.

-- John

jpettit@logictier.com


RE: Any ideas about lost headers with SSL?

Posted by John Pettit <jp...@logictier.com>.
> John, an answer to this question might be better facilitated by a
> specific example of what you were doing (in code).

Good point, Daniel. ;-)

To recap, if I go straight to tomcat at http://myserver:8080/app/blah,jsp, I
receive header information. If I go to https://myserver/app/blah.jsp, and
print out the values of the headers ... there aren't any. (And it doesn't
seem to be an apache ssl thing as I wrote a perl script that does get
headers successfully running at https://myserver/cgi-bin/headers.pl )

The jsp file I'm using is below. It successfully sets a cookie, but all all
the request headers are always empty:
---------- blah.jsp -------------
<%@ page import="javax.servlet.http.*, java.util.*" %>
<%
        Cookie c1 = new Cookie("xzzMyCookie2" , "baz76");
        c1.setMaxAge(1900);
        c1.setPath("/");
        c1.setSecure(true);
        response.addCookie(c1);
%>
<html>
<body>
Cookies in:<%= request.getHeader("cookie") %><br>
Cookies in:<%= request.getCookies() %><br>
Any cookies?<br>
<%
        // No cookies under SSL (but my cgi-bin script sees them)
        Cookie[] cookies = request.getCookies();
        for (int i=0; i < cookies.length; i++)
        {
                out.write(cookies[i].getName());
        }
        out.write("<p>Now, the headers...<br>");

        // No headers will be found when running under SSL
        for (Enumeration e=request.getHeaderNames(); e.hasMoreElements(); )
        {
                String theHeader = (String) e.nextElement();
                out.write(theHeader + "=" + request.getHeader(theHeader) +
"<br>");
        }
%>
</body>
</html>


Again, thanks for any help!

-- John

-----Original Message-----
From: dlr@finemaltcoding.com [mailto:dlr@finemaltcoding.com]
Sent: Saturday, February 12, 2000 9:40 PM
To: tomcat-dev@jakarta.apache.org
Subject: Re: Any ideas about lost headers with SSL?


> I'm using Tomcat 3.1M1 with an Apache 1.3.9 SSL server. I wrote a simple
jsp
> page to determine what headers I was getting, in an attempt to find out
why
> I was not getting any cookies sent back to the server, and I was getting
no
> headers at all (e.g. no HTTP_USER_AGENT, COOKIE, ACCEPT, etc).
>
> Any ideas what I might be doing wrong?
>
> Thanks for any help, I'm getting a bit desperate here.

John, an answer to this question might be better facilitated by a
specific example of what you were doing (in code).
--

Daniel Rall (dlr@finemaltcoding.com)

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org



Re: Any ideas about lost headers with SSL?

Posted by "Daniel L. Rall" <dl...@finemaltcoding.com>.
> I'm using Tomcat 3.1M1 with an Apache 1.3.9 SSL server. I wrote a simple jsp
> page to determine what headers I was getting, in an attempt to find out why
> I was not getting any cookies sent back to the server, and I was getting no
> headers at all (e.g. no HTTP_USER_AGENT, COOKIE, ACCEPT, etc).
> 
> Any ideas what I might be doing wrong?
> 
> Thanks for any help, I'm getting a bit desperate here.

John, an answer to this question might be better facilitated by a
specific example of what you were doing (in code).
-- 

Daniel Rall (dlr@finemaltcoding.com)