You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Holger Klawitter <li...@klawitter.de> on 2005/06/13 11:04:03 UTC

tomcat does not like cmdline args of wget?

Hi there,

what might be the reasion that

  wget http://theUser:thePass@theHost/someURL

is working, whereas

  wget --http-user=theUser --http-passwd=thePass http://theHost/someURL

yields "Authorization failed" (401)? (I also tried --cookies=on)

(tomcat 5.5.9, wget 1.9.1, jdk 1.5.0_2)

-- 
With Kind Regards / Mit freundlichem Gruß
  Holger Klawitter (listen <at> klawitter <dot> de)


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


Re: tomcat does not like cmdline args of wget?

Posted by Tim Funk <fu...@joedog.org>.
Works for me. (Using wget 1.9.1) Using tomcat 5.0.X.

I don't have a tomcat 5.5.X readily available to quickly test this case.

-Tim

Holger Klawitter wrote:

> Hi there,
> 
> what might be the reasion that
> 
>   wget http://theUser:thePass@theHost/someURL
> 
> is working, whereas
> 
>   wget --http-user=theUser --http-passwd=thePass http://theHost/someURL
> 
> yields "Authorization failed" (401)? (I also tried --cookies=on)
> 
> (tomcat 5.5.9, wget 1.9.1, jdk 1.5.0_2)
> 

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


Re: tomcat does not like cmdline args of wget?

Posted by Mario Ivankovits <ma...@ops.co.at>.
Holger Klawitter wrote:
>There is one indeed interesting difference, both requests end up with a
>different (each one is reproducable) auth string:
>  
Sorry, didnt follow the conversion and thus it might be complete wrong 
what comes into my mind, but:
Do you have some special character in your password - say:
$ (which might be replaced by the shell), ! (also) or german umlauts and 
your system do not use the same encoding - say it uses ISO-8859-1 but 
your password is stored in an UTF-8 environmen.

---
Mario


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


Re: tomcat does not like cmdline args of wget?

Posted by Shiro Amada <sh...@yahoo.com>.
First I won;t like to say thx for reply my mail. Sorry for didn't tell my OS, I am using Windows OS SP2, and then now I doing java servlet, the problem is I can connect with my MS Access database. I already attact my java file, u can have the look. The coding don't have problem, because that code can be run at other people pc, but they are using TOMCAT 4.2. I am using TOMCAT 5.5.9, that why I having the problem. I have been ask my lecturer. He told me that u just go to Control Panel -> Admin Tool -> Data Sources (ODBC) -> System DNS part add the Data Source name then is ok, but I found that the output still the same, I can connected to my database. Can u help me solve the problem. THANK YOU!
 

Holger Klawitter <li...@klawitter.de> wrote:

> Why, not? It is always a good idea to start testing the simple things ;)

Never mind, I would even been happier to say 'doh' at this point and hence
seeing the problem solved :-)

> You could google for problems with wget authentication. Maybe others
> have found similar problems.

I'll check that, thanks for your help!

-- 
With Kind Regards / Mit freundlichem Gru?lt;br> Holger Klawitter (listen klawitter de)


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


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: tomcat does not like cmdline args of wget?

Posted by Holger Klawitter <li...@klawitter.de>.
> Why, not? It is always a good idea to start testing the simple things ;)

Never mind, I would even been happier to say 'doh' at this point and hence
seeing the problem solved :-)

> You could google for problems with wget authentication. Maybe others
> have found similar problems.

I'll check that, thanks for your help!

-- 
With Kind Regards / Mit freundlichem Gruß
  Holger Klawitter (listen <at> klawitter <dot> de)


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


Re: tomcat does not like cmdline args of wget?

Posted by Christoph Kutzinski <ku...@gmx.de>.
Holger Klawitter wrote:
> Christoph Kutzinski wrote:
> 
> 
>>wget --http-user=theUser --http-passwd=thePass http://theHost/someURL
>>vs.
>>wget http://theUser:thePass@theHost/someURL
>>with BASIC auth
> 
> 
>>Or are you really literally writing
>>wget http://theUser:thePass@theHost/someURL
> 
> 
> of course not :-)

Why, not? It is always a good idea to start testing the simple things ;)


> There was no shell escaping involved (username and password both matched
> "[a-zA-Z0-9]*" and escaping would affect both access patterns the same way,
> wouldn't it?)

Not necessarily. If the password would contain %20 for example, this 
would probably be interpreted as a space in
wget http://theUser:thePass@theHost/someURL,
but as %20 in
wget --http-user=theUser --http-passwd=thePass http://theHost/someURL


I have no more ideas. Currently sounds like a wget problem to me, too.
But I cannot imagine that wget should have such a big error.
(I just tried it here without problems)
Have you tried the same with other browsers?

You could google for problems with wget authentication. Maybe others 
have found similar problems.

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


Re: tomcat does not like cmdline args of wget?

Posted by Holger Klawitter <li...@klawitter.de>.
Christoph Kutzinski wrote:

>wget --http-user=theUser --http-passwd=thePass http://theHost/someURL
> vs.
>wget http://theUser:thePass@theHost/someURL
> with BASIC auth

> Or are you really literally writing
> wget http://theUser:thePass@theHost/someURL

of course not :-)

There was no shell escaping involved (username and password both matched
"[a-zA-Z0-9]*" and escaping would affect both access patterns the same way,
wouldn't it?)

With Kind Regards / Mit freundlichem Gruß
  Holger Klawitter (listen <at> klawitter <dot> de)


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


Re: tomcat does not like cmdline args of wget?

Posted by Christoph Kutzinski <ku...@gmx.de>.
Are there any special chars in theUser and/or thePass that could 
possibly escaped in the URL and/or by the shell?
E.g. Umlauts, Whitespace, %, ...

Or are you really literally writing
wget http://theUser:thePass@theHost/someURL
?

Holger Klawitter wrote:
> QM wrote:
> 
> 
>>On Mon, Jun 13, 2005 at 11:04:03AM +0200, Holger Klawitter wrote:
>>: what might be the reasion that
>>:   wget http://theUser:thePass@theHost/someURL
>>: is working, whereas
>>:   wget --http-user=theUser --http-passwd=thePass http://theHost/someURL
>>: yields "Authorization failed" (401)? (I also tried --cookies=on)
>>
>>I don't know off the top of my head, but you could (temporarily) enable
>>RequestDumperValve and compare the two requests.
> 
> 
> There is one indeed interesting difference, both requests end up with a
> different (each one is reproducable) auth string:
> 
> INFO:             header=authorization=Basic ******F0OjE1c***emxl
> INFO:             header=authorization=Basic ******VyOjI3Y***ZQ==
> 
> ("******" and "***" is manual masking)
> 
> Am I right to assume wget to be the culprit?
> 


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


Re: tomcat does not like cmdline args of wget?

Posted by Holger Klawitter <li...@klawitter.de>.
QM wrote:

> On Mon, Jun 13, 2005 at 11:04:03AM +0200, Holger Klawitter wrote:
> : what might be the reasion that
> :   wget http://theUser:thePass@theHost/someURL
> : is working, whereas
> :   wget --http-user=theUser --http-passwd=thePass http://theHost/someURL
> : yields "Authorization failed" (401)? (I also tried --cookies=on)
> 
> I don't know off the top of my head, but you could (temporarily) enable
> RequestDumperValve and compare the two requests.

There is one indeed interesting difference, both requests end up with a
different (each one is reproducable) auth string:

INFO:             header=authorization=Basic ******F0OjE1c***emxl
INFO:             header=authorization=Basic ******VyOjI3Y***ZQ==

("******" and "***" is manual masking)

Am I right to assume wget to be the culprit?

-- 
With Kind Regards / Mit freundlichem Gruß
  Holger Klawitter (listen <at> klawitter <dot> de)


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


Re: tomcat does not like cmdline args of wget?

Posted by QM <qm...@brandxdev.net>.
On Mon, Jun 13, 2005 at 11:04:03AM +0200, Holger Klawitter wrote:
: what might be the reasion that
:   wget http://theUser:thePass@theHost/someURL
: is working, whereas
:   wget --http-user=theUser --http-passwd=thePass http://theHost/someURL
: yields "Authorization failed" (401)? (I also tried --cookies=on)

I don't know off the top of my head, but you could (temporarily) enable
RequestDumperValve and compare the two requests.

-QM

-- 

software   -- http://www.brandxdev.net/
tech news  -- http://www.RoarNetworX.com/
code scan  -- http://www.JxRef.org/

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