« Return to Thread: HTTP request header
Hi,
I already tried:
request.getAttributes().get( "REMOTE_USER" )
this returns null.
Any other ideas? I’m at a loss.
David
David Tanner
Massachusetts Institute of Technology
Information Services and Technology
W92-144
617-253-0110
From:
t.cservenak@... [mailto:t.cservenak@...] On Behalf Of Tamás Cservenák
Sent: Thursday, February 19, 2009
9:08 PM
To: nexus-dev@...
Subject: Re: [nexus-dev] HTTP
request header
Hi,
something like this?
See the attribute "org.restlet.http.headers"...
~t~
On Fri, Feb 20, 2009 at 3:07 AM, dtanner <dtanner@...> wrote:
I would love to get rid of:
HttpServletRequest
servletRequest = ((ServletCall)((HttpRequest)request).getHttpCall()).getRequest();
And replace it with:
request.getAttributes().get(
"value" )
However, I have to get the apache REMOTE_USER environmental
variable and the only way that I've been able to do this is by using:
HttpServletRequest
servletRequest =
((ServletCall)((HttpRequest)request).getHttpCall()).getRequest();
String Username =
(String)servletRequest.getRemoteUser();
If you know of a way that is equivalent to the above using
request.getAttributes().get( "value" ) or by any other means, I'm all
ears!
Have any ideas?
David
David Tanner
Massachusetts Institute of Technology
Information Services and Technology
W92-144
617-253-0110
From: t.cservenak@...
[mailto:t.cservenak@...]
On Behalf Of Tamás Cservenák
Sent: Thursday, February 19, 2009
2:32 PM
To: nexus-dev@...
Subject: Re: [nexus-dev] HTTP
request header
Well,
the code
seems right (albeit dirty as I warned you) :)
Only
thing I can say: the header is not there. Are you sure that you put the header
into the _incoming_ request? Isn't that coming from the response header you
send out to do the auth? (if I understood correctly).
Ie. Maven
will never send an email in header, when requesting an artifact :)
~t~
On Thu,
Feb 19, 2009 at 8:25 PM, dtanner <dtanner@...> wrote:
I'm using nexus 1.2.1 war with apache 2.2.3 and Tomcat 5.5.25.
I
need to get header information from the initial HTTP request. I'm doing
the following:
HttpServletRequest servletRequest =
((ServletCall)((HttpRequest)request).getHttpCall()).getRequest();
String email =
(String)servletRequest.getHeader("Shib-InetOrgPerson-mail");
I
should be getting an email address, but instead I'm getting a null.
I
know I should be getting an email address because I wrote a simple jsp test web
application (and deployed the test to that same container that nexus is
deployed to) to test the header.
I'm
doing something wrong. Any ideas?
David
David Tanner
Massachusetts Institute of Technology
Information Services and Technology
W92-144
617-253-0110
« Return to Thread: HTTP request header
| Free embeddable forum powered by Nabble | Forum Help |