Your message dated Tue, 23 Aug 2005 23:32:33 +0200
with message-id <[EMAIL PROTECTED]>
and subject line Bug#226084: wget: incorrect encoding of local file names with 
-k
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 4 Jan 2004 09:17:55 +0000
>From [EMAIL PROTECTED] Sun Jan 04 03:17:54 2004
Return-path: <[EMAIL PROTECTED]>
Received: from p508d39e1.dip.t-dialin.net (mst.ath.cx) [80.141.57.225] 
        by master.debian.org with esmtp (Exim 3.35 1 (Debian))
        id 1AculX-0005xV-00; Sat, 03 Jan 2004 17:01:07 -0600
Received: from mstoll by localhost with local (Exim 3.36 #1 (Debian))
        id 1Acul9-0000aq-00; Sun, 04 Jan 2004 00:00:43 +0100
Content-Type: multipart/mixed; boundary="===============1796773899=="
MIME-Version: 1.0
From: Martin Stolle <[EMAIL PROTECTED]>
To: Debian Bug Tracking System <[EMAIL PROTECTED]>
Subject: wget: incorrect encoding of local file names with -k
X-Mailer: reportbug 2.37
Date: Sun, 04 Jan 2004 00:00:37 +0100
Message-Id: <[EMAIL PROTECTED]>
Sender: Martin Stolle <[EMAIL PROTECTED]>
X-BadReturnPath: [EMAIL PROTECTED] rewritten as [EMAIL PROTECTED]
  using "From" header
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 
        2.60-master.debian.org_2003_11_25-bugs.debian.org_2004_1_3 
        (1.212-2003-09-23-exp) on master.debian.org
X-Spam-Status: No, hits=-1.9 required=4.0 tests=HAS_PACKAGE,HTML_MESSAGE 
        autolearn=no 
        version=2.60-master.debian.org_2003_11_25-bugs.debian.org_2004_1_3
X-Spam-Level: 

This is a multi-part MIME message sent by reportbug.

--===============1796773899==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Package: wget
Version: 1.9.1-3
Severity: normal
Tags: patch

when doing a recursive wget with -k on a website that includes
characters that are saved locally using %xx escapes, the file name is
not correctly converted in the refering pages.  The local file name is
verbatimely put in the HTML document.  The browser however un-escapes
the %xx, breaking local (and http) browsing.

Example:

http://sample/sample.cgi?dir=/

is saved as

sample.cgi?dir=%2F

.  A link that refers to this page is encoded as

<A HREF="sample.cgi%3Fdir=%2F">

this is incorrect, since the browse correctly unescapes this as

sample.cgi?dir=/

which does not exist.  In order to behave correctly, the link in the
html document should escape the % sign:

<A HREF="sample.cgi%3Fdir%3D%252F">

which would be correctly interpreted by the browser as

sample.cgi?dir=%2F

the correct local file name.

The patch corrects this situation by url-escaping local links.

Martin


-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux martin1 2.4.23 #1 Thu Dec 11 01:00:56 EST 2003 i686
Locale: LANG=C, LC_CTYPE=en_US.UTF-8

Versions of packages wget depends on:
ii  libc6                       2.3.2.ds1-10 GNU C Library: Shared libraries an
ii  libssl0.9.7                 0.9.7c-5     SSL shared libraries

-- no debconf information


--===============1796773899==
Content-Type: text/x-c; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="/usr/src/wget-local-encode.patch"

diff -u -r wget-1.9.1/src/convert.c wget-1.9.1-modified/src/convert.c
--- wget-1.9.1/src/convert.c    2003-09-30 23:54:27.000000000 +0200
+++ wget-1.9.1-modified/src/convert.c   2004-01-03 23:31:50.000000000 +0100
@@ -275,7 +275,7 @@
          /* Convert absolute URL to relative. */
          {
            char *newname = construct_relative (file, link->local_name);
-           char *quoted_newname = local_quote_string (newname);
+           char *quoted_newname = local_quote_string 
(url_escape_dir2(newname));
 
            if (!link->link_refresh_p)
              p = replace_attr (p, link->size, fp, quoted_newname);
diff -u -r wget-1.9.1/src/url.c wget-1.9.1-modified/src/url.c
--- wget-1.9.1/src/url.c        2003-10-30 16:42:23.000000000 +0100
+++ wget-1.9.1-modified/src/url.c       2004-01-03 23:29:21.000000000 +0100
@@ -1155,6 +1155,13 @@
   return newdir;
 }
 
+char *
+url_escape_dir2 (const char *s)
+{
+  return url_escape_dir(s);
+}
+
+
 /* Sync u->path and u->url with u->dir and u->file.  Called after
    u->file or u->dir have been changed, typically by the FTP code.  */
 
diff -u -r wget-1.9.1/src/url.h wget-1.9.1-modified/src/url.h
--- wget-1.9.1/src/url.h        2003-09-22 00:47:14.000000000 +0200
+++ wget-1.9.1-modified/src/url.h       2004-01-03 23:23:02.000000000 +0100
@@ -74,6 +74,7 @@
 /* Function declarations */
 
 char *url_escape PARAMS ((const char *));
+char *url_escape_dir2 PARAMS ((const char *));
 
 struct url *url_parse PARAMS ((const char *, int *));
 const char *url_error PARAMS ((int));

--===============1796773899==--

---------------------------------------
Received: (at 226084-done) by bugs.debian.org; 23 Aug 2005 21:32:37 +0000
>From [EMAIL PROTECTED] Tue Aug 23 14:32:37 2005
Return-path: <[EMAIL PROTECTED]>
Received: from h02.hostsharing.net (pomo.hostsharing.net) [212.21.77.2] 
        by spohr.debian.org with esmtp (Exim 3.36 1 (Debian))
        id 1E7gNo-0003Mt-00; Tue, 23 Aug 2005 14:32:36 -0700
Received: from localhost (dsl-082-083-237-154.arcor-ip.net [82.83.237.154])
        (using SSLv3 with cipher RC4-MD5 (128/128 bits))
        (No client certificate requested)
        by pomo.hostsharing.net (Postfix) with ESMTP id 40F43A03703
        for <[EMAIL PROTECTED]>; Tue, 23 Aug 2005 23:32:36 +0200 (CEST)
Subject: Re: Bug#226084: wget: incorrect encoding of local file names with
        -k
From: =?ISO-8859-1?Q?No=E8l_K=F6the?= <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
In-Reply-To: <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
Content-Type: multipart/signed; micalg=pgp-sha1; 
protocol="application/pgp-signature"; boundary="=-maug7SL5blNu/He+UmB4"
Organization: Debian GNU/Linux, www.debian.org
Date: Tue, 23 Aug 2005 23:32:33 +0200
Message-Id: <[EMAIL PROTECTED]>
Mime-Version: 1.0
X-Mailer: Evolution 2.2.3 
Delivered-To: [EMAIL PROTECTED]
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2005_01_02 
        (1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Level: 
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
        autolearn=no version=2.60-bugs.debian.org_2005_01_02


--=-maug7SL5blNu/He+UmB4
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Am Dienstag, den 23.08.2005, 17:53 +0200 schrieb Hrvoje Niksic:
> This bug is fixed in Wget 1.10.  Thanks for the report.

--=20
No=C3=A8l K=C3=B6the <noel debian.org>

--=-maug7SL5blNu/He+UmB4
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQBDC5Xx9/DnDzB9Vu0RAqyeAKCEuacUgsvnqBN/JJZhjdSj7/BfPQCgjAXy
Tj7inHhrEt7fWTW5vG89kuE=
=LgZL
-----END PGP SIGNATURE-----

--=-maug7SL5blNu/He+UmB4--


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to