Re: [squid-users] invalid url

From: Jørgen Hovland <jorgen@dont-contact.us>
Date: Mon, 15 Mar 2004 14:19:36 -0000

----- Original Message -----
From: "Denis Vlasenko" <vda@port.imtp.ilyichevsk.odessa.ua>
To: "Jørgen Hovland" <jorgen@hovland.cx>; "Henrik Nordstrom" <hno@squid-cache.org>
Cc: <squid-users@squid-cache.org>
Sent: Monday, March 15, 2004 6:39 AM
Subject: Re: [squid-users] invalid url

> On Monday 15 March 2004 03:56, Jørgen Hovland wrote:
> > Ok I just commented out the few lines in src/url.c starting at line 309
> > (#if CHECK_HOSTNAMES....)
> >
> > It works!

Henrik Nordstrom> No it does not, it only looks like it works.

You are wrong, it works. You can try for yourself.

> > Here comes the however:
> > When using MSIE the hostname points you to the wrong website.
> > If I disable proxy in MSIE I get to the correct website. There seems to be
> > an encoding problem somewhere. I telneted manually to squid and requested
> > www.jørgen.nu in ISO-8859-1 and UTF-8 mode and it worked. Seems like IE use
> > urlencoding when using proxy, or IE use it all the time ? Is this a IE bug
>

Denis Vlasenko> Use tcpdump to find out

Good idea.

15:07:44.500574 client.3617 > webserver.80: P 1:213(212) ack 1 win 65000 <nop,nop,timestamp 811567 958736353> (DF)
0x0000 4500 0108 0428 4000 8006 b669 d5b3 39ef E....(@....i..9.
0x0010 d4b5 5b06 0e21 0050 ece9 947e 73f6 4f0a ..[..!.P...~s.O.
0x0020 8018 fde8 bbb7 0000 0101 080a 000c 622f ..............b/
0x0030 3925 27e1 4745 5420 2f20 4854 5450 2f31 9%'.GET./.HTTP/1
0x0040 2e31 0d0a 4163 6365 7074 3a20 2a2f 2a0d .1..Accept:.*/*.
0x0050 0a41 6363 6570 742d 4c61 6e67 7561 6765 .Accept-Language
0x0060 3a20 6e6f 0d0a 4163 6365 7074 2d45 6e63 :.no..Accept-Enc
0x0070 6f64 696e 673a 2067 7a69 702c 2064 6566 oding:.gzip,.def
0x0080 6c61 7465 0d0a 5573 6572 2d41 6765 6e74 late..User-Agent
0x0090 3a20 4d6f 7a69 6c6c 612f 342e 3020 2863 :.Mozilla/4.0.(c
0x00a0 6f6d 7061 7469 626c 653b 204d 5349 4520 ompatible;.MSIE.
0x00b0 362e 303b 2057 696e 646f 7773 204e 5420 6.0;.Windows.NT.
0x00c0 352e 313b 202e 4e45 5420 434c 5220 312e 5.1;..NET.CLR.1.
0x00d0 312e 3433 3232 290d 0a48 6f73 743a 2077 1.4322)..Host:.w
0x00e0 7777 2e6a f872 6765 6e2e 6e75 0d0a 436f ww.j.rgen.nu..Co
0x00f0 6e6e 6563 7469 6f6e 3a20 4b65 6570 2d41 nnection:.Keep-A
0x0100 6c69 7665 0d0a 0d0a live....

15:10:48.714521 client.3620 > proxy.80: P 1:231(230) ack 1 win 64240 (DF)
0x0000 4500 010e 0557 4000 8006 d63a d5b3 39ef E....W@....:..9.
0x0010 d5b3 3902 0e24 0539 efa8 38c2 0ead 4ffe ..9..$.9..8...O.
0x0020 5018 faf0 1de0 0000 4745 5420 6874 7470 P.......GET.http
0x0030 3a2f 2f77 7777 2e6a 2543 3325 4238 7267 ://www.j%C3%B8rg
0x0040 656e 2e6e 752f 2048 5454 502f 312e 300d en.nu/.HTTP/1.0.
0x0050 0a41 6363 6570 743a 202a 2f2a 0d0a 4163 .Accept:.*/*..Ac
0x0060 6365 7074 2d4c 616e 6775 6167 653a 206e cept-Language:.n
0x0070 6f0d 0a50 726f 7879 2d43 6f6e 6e65 6374 o..Proxy-Connect
0x0080 696f 6e3a 204b 6565 702d 416c 6976 650d ion:.Keep-Alive.
0x0090 0a55 7365 722d 4167 656e 743a 204d 6f7a .User-Agent:.Moz
0x00a0 696c 6c61 2f34 2e30 2028 636f 6d70 6174 illa/4.0.(compat
0x00b0 6962 6c65 3b20 4d53 4945 2036 2e30 3b20 ible;.MSIE.6.0;.
0x00c0 5769 6e64 6f77 7320 4e54 2035 2e31 3b20 Windows.NT.5.1;.
0x00d0 2e4e 4554 2043 4c52 2031 2e31 2e34 3332 .NET.CLR.1.1.432
0x00e0 3229 0d0a 5072 6167 6d61 3a20 6e6f 2d63 2)..Pragma:.no-c
0x00f0 6163 6865 0d0a 486f 7374 3a20 7777 772e ache..Host:.www.
0x0100 6ac3 b872 6765 6e2e 6e75 0d0a 0d0a j..rgen.nu....

I see that IE sends an url encoded GET line, which is what it is supposed to do. I would put my 5 euro in that this is a
non-implemented squid feature.

Henrik Nordstrom> This is not supposed to work. HTTP is specified ASCII only for host names.
Henrik Nordstrom>
Henrik Nordstrom> If you want to browse an IDN name you MUST today use a browser which has
Henrik Nordstrom> IDN support. For MSIE this involves installing one of the IDN plugins.

Im simply interested in getting things to work. Permitting such domains will acomplish this task.
I have no control over all the browsers that will be using our proxy.

Henrik Nordstrom>
Henrik Nordstrom> > Seems like IE use urlencoding when using proxy, or IE use it all the
Henrik Nordstrom> > time ? Is this a IE bug or a non-implemented squid feature (and will it
Henrik Nordstrom> > be implemented) ?
Henrik Nordstrom>
Henrik Nordstrom> Your browser is not IDN capable. As you are trying to use your browser in
Henrik Nordstrom> situations it is not designed for odd things happens as it is trying to
Henrik Nordstrom> comply to standards given junk input.

As you probably are aware of, there are probably more browsers out there not IDN capable than capable of IDN.
Rejecting such domains in a proxy software is not going to help anyone. The smartest thing would be to automaticly translate to IDN
in squid directly (as an optional choice of course).

Cheers,
Joergen
Received on Mon Mar 15 2004 - 07:20:00 MST

This archive was generated by hypermail pre-2.1.9 : Thu Apr 01 2004 - 12:00:02 MST