You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@ws.apache.org by Brian Williams <br...@bw42.net> on 2006/03/07 03:51:00 UTC

Can't send BASIC Auth to Tomcat

I'm using Apache's XML-RPC version 2 with an out of the box Tomcat 5.5.7
installation.  I want to send BASIC authentication headers to the
XML-RPC server running inside a HttpServlet class on my Tomcat web
app.   I can execute non-auth based xml-rpc requests no problem, the
only issue I have is getting the Authorization header information passed
on to my Servlet.

Here's the basic snippet of code I call, but the HttpServletRequest
object on the server is the same with or without the 2nd line.

            this.trans = new CommonsXmlRpcTransport(this.url);
            this.trans.setBasicAuthentication("AKJADA", "ASFAFDS");
            Object obj = client.execute(req, this.trans);

Do I need some sort of rewrite rules in Tomcat or is there some way to
let the servlet handle the authentication?  It seems Tomcat strips that
header before passing it onto the servlet.

Brian

Fwd: Can't send BASIC Auth to Tomcat

Posted by Danny Angus <da...@gmail.com>.
this issue could be resolved if you reopen this issue:
http://issues.apache.org/jira/browse/XMLRPC-27?page=comments#action_12378388


---------- Forwarded message ----------
From: Brian Williams <br...@bw42.net>
Date: 07-Mar-2006 03:51
Subject: Can't send BASIC Auth to Tomcat
To: xmlrpc-user@ws.apache.org


I'm using Apache's XML-RPC version 2 with an out of the box Tomcat 5.5.7
installation.  I want to send BASIC authentication headers to the
XML-RPC server running inside a HttpServlet class on my Tomcat web
app.   I can execute non-auth based xml-rpc requests no problem, the
only issue I have is getting the Authorization header information passed
on to my Servlet.

Here's the basic snippet of code I call, but the HttpServletRequest
object on the server is the same with or without the 2nd line.

            this.trans = new CommonsXmlRpcTransport(this.url);
            this.trans.setBasicAuthentication("AKJADA", "ASFAFDS");
            Object obj = client.execute(req, this.trans);

Do I need some sort of rewrite rules in Tomcat or is there some way to
let the servlet handle the authentication?  It seems Tomcat strips that
header before passing it onto the servlet.

Brian