Hello Peng, AFAICS, `s' is a path, so '/' in the query string is escaped and `acceptable' doesn't see it.
As for your example: http://xxx.org/somescript?arg1=/xxy `s' in this case will be something like: xxx.org/somescript?arg1=%2Fxxy Do you have any example where it doesn't work? Cheers, Giuseppe Peng Yu <pengyu...@gmail.com> writes: > 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