bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-wget] Bug in processing url query arguments that have '/'


From: Peng Yu
Subject: [Bug-wget] Bug in processing url query arguments that have '/'
Date: Sun, 7 Aug 2011 01:00:01 -0500

Hi,

The following line is in utils.c.

# in acceptable (const char *s)

  while (l && s[l] != '/')
    --l;
  if (s[l] == '/')
    s += (l + 1);

It essentially gets a substring after the last '/'. However, when a
query has '/', this is problematic. For example, the above code snip
will extract '/xxy' instead of 'somescript?arg1=/xxy'. I think that
the above code should add the test of the position of '?'. If there is
a '?', it should look for the last '/' before '?'. Is it the case?

http://xxx.org/somescript?arg1=/xxy

-- 
Regards,
Peng



reply via email to

[Prev in Thread] Current Thread [Next in Thread]