Re: trouble with encoded filename

2004-04-08 Thread none none
--- Hrvoje Niksic [EMAIL PROTECTED] wrote:
 Maybe the site expressly disallows Wget to
 access it?  Maybe the site has anti-leech
 protection that requires sending the `Referer'
 header to thwart it?  Maybe you need to have a
 cookie to access the site that Opera sends?

Well, I found out a little bit more about the
real reason for the problem. Opera has a very
convenient option called Encode International
Web Addresses with UTF-8. When I had this
option checked, it could retrieve the file
without problems. Without this option enabled,
I get the same forbidden response that I
received when I used wget.

In my never-humble opinion, wget needs this
ability also. I had hoped that using the option
--restrict-file-names=nocontrol would have
disabled encoding of the URL, but apparently,
it does not.

__
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/


Re: trouble with encoded filename

2004-04-08 Thread Tony Lewis
[EMAIL PROTECTED] wrote:

 Well, I found out a little bit more about the
 real reason for the problem. Opera has a very
 convenient option called Encode International
 Web Addresses with UTF-8. When I had this
 option checked, it could retrieve the file
 without problems. Without this option enabled,
 I get the same forbidden response that I
 received when I used wget.

 In my never-humble opinion, wget needs this
 ability also. I had hoped that using the option
 --restrict-file-names=nocontrol would have
 disabled encoding of the URL, but apparently,
 it does not.

Huh?

Opera is doing special encoding for some types of web addresses and you
hoped that disabling ALL encoding would somehow make wget do the same thing?

If special encoding is required: 1) someone has to write the code in wget to
perform that encoding and 2) it has to be ENabled (not DISabled).

Tony



Re: trouble with encoded filename

2004-04-08 Thread none none
--- Tony Lewis [EMAIL PROTECTED] wrote:
 Opera is doing special encoding for some
 types of web addresses and you hoped that
 disabling ALL encoding would somehow make
 wget do the same thing?

Disabling escaped octet encoding would work.
It does not seem unreasonable to HOPE (but
not expect) that disabling encoding for file
names would do that.

 If special encoding is required: 1) someone
 has to write the code in wget to perform that
 encoding

I agree with that (I could write it in Perl,
but I doubt that that would help much :) ).

 and 2) it has to be ENabled (not DISabled).

No, escaped octet encoding (the default for
most user agents) needs to be DISABLED (and
the actual character sent). I looked at Opera
some more, and in this case, it still only
sent one byte for this character (UTF8 uses
two bytes for anything not seven bit ASCII).

I can't argue with the fact that it worked
in Opera though, and I just want wget to send
(if I disable escaped ASCII encoding of high
bit characters) the unencoded URL. (exactly
as I type or paste it).

__
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/


Re: trouble with encoded filename

2004-04-07 Thread Hrvoje Niksic
none none [EMAIL PROTECTED] writes:

 (URL changed for privacy)

 $ wget http://1.2.3.4/?.file
 --00:00:00--  http://1.2.3.4/%E9.file
= `?.file'
 Connecting to 1.2.3.4:80... connected.
 HTTP request sent, awaiting response... 403 Forbidden
 00:00:00 ERROR 403: Forbidden.

 $ wget -V
 GNU Wget 1.9

 Gentoo GNU/Linux

 Opera (for example) has no problem retrieving the URL.

Maybe the site expressly disallows Wget to access it?  Maybe the site
has anti-leech protection that requires sending the `Referer' header
to thwart it?  Maybe you need to have a cookie to access the site that
Opera sends?

Try `wget --user-agent=Mozilla --referer=http://1.2.3.4 ...'  That
gets you past 90% of anti-leech code.



Re: trouble with encoded filename

2004-04-07 Thread none none
--- Hrvoje Niksic [EMAIL PROTECTED] wrote:
  (URL changed for privacy)
 
  $ wget http://1.2.3.4/?.file
  --00:00:00--  http://1.2.3.4/%E9.file
 = `?.file'
  Connecting to 1.2.3.4:80... connected.
  HTTP request sent, awaiting response... 403 Forbidden
  00:00:00 ERROR 403: Forbidden.
 
  $ wget -V
  GNU Wget 1.9
 
  Gentoo GNU/Linux
 
  Opera (for example) has no problem retrieving the URL.
 
 Maybe the site expressly disallows Wget to
 access it?  Maybe the site  has anti-leech
 protection that requires sending the `Referer'
 header to thwart it?  Maybe you need to have a
 cookie to access the site that Opera sends?

No, I retrieved more than fifty other files from
this site without any problem (and Opera gave
the same access forbidden message when I, as
a test, substituted %E9 for that one character
in the URL). None of the other filenames had any
characters in the upper half of the ascii table.

 Try `wget --user-agent=Mozilla --referer=http://1.2.3.4 ...'
 That gets you past 90% of anti-leech code.

If you insist.

$ wget -S --referer=http://5.6.7.8/index.htm \
  --user-agent=Mozilla \
  http://1.2.3.4/?.file
--00:00:00--  http://1.2.3.4/%E9.file
   = `?.file'
Connecting to 1.2.3.4:80... connected.
HTTP request sent, awaiting response...
 1 HTTP/1.1 403 Forbidden
 2 Date: Wed, 07 Apr 2004 00:00:00 GMT
 3 Server: Apache/2.0.48 (Win32)
 4 Content-Length: 323
 5 Keep-Alive: timeout=15, max=100
 6 Connection: Keep-Alive
 7 Content-Type: text/html; charset=iso-8859-1
00:00:00 ERROR 403: Forbidden.

__
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/


Re: trouble with encoded filename

2004-04-07 Thread Jochen Roderburg
none none wrote:
$ wget -S --referer=http://5.6.7.8/index.htm \
  --user-agent=Mozilla \
  http://1.2.3.4/?.file
--00:00:00--  http://1.2.3.4/%E9.file
   = `?.file'
Connecting to 1.2.3.4:80... connected.
HTTP request sent, awaiting response...
 1 HTTP/1.1 403 Forbidden
 2 Date: Wed, 07 Apr 2004 00:00:00 GMT
 3 Server: Apache/2.0.48 (Win32)
 4 Content-Length: 323
 5 Keep-Alive: timeout=15, max=100
 6 Connection: Keep-Alive
 7 Content-Type: text/html; charset=iso-8859-1
00:00:00 ERROR 403: Forbidden.
Hi,

Are you really sure that the file you want has the name ?.file with a 
question mark character??
I see from the headers that the server involved runs under Windows and 
the question mark is most certainly a character which is not possible in 
a filename under DOS/Windows.

Regards, J.Roderburg


Re: trouble with encoded filename

2004-04-07 Thread none none
--- Jochen Roderburg [EMAIL PROTECTED] wrote:
 Are you really sure that the file you want
 has the name ?.file with a question mark
 character??

Not a question mark in wget, or when I sent
the mail - it seems that Yahoo mangles it on
the way out (another case of characters in
the upper half of the ascii table - which I
DID mention - not handled correctly).

You can see the actual character here (E9):

http://bbsinc.com/pic/fnt-mswin.gif

Wget did send (what looks like) the correct
encoding (which usually works, but did not
in this case). Since Opera can retrieve the
file, some way does exist to send the name
in a way that the server understands it (the
forbidden message does seem a little odd,
though - I would have expected the server to
return a not found.

__
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/