Rainer,
On 10/23/2011 12:19 PM, rj...@apache.org wrote:
+/*
+ * Find the first occurrence of path in uri tokenized by /.
+ * The comparison is done case insensitive.
+ */
+static const char *find_path_in_uri(const char *uri, const char *path)
+{
+size_t len = strlen(path);
+while
Rainer,
On 10/23/2011 12:19 PM, rj...@apache.org wrote:
+static const char *find_path_in_uri(const char *uri, const char *path)
+{
+size_t len = strlen(path);
+while (uri = strchr(uri, '/')) {
+uri++;
+if (!strncmp(uri, path, len)
+(*(uri + len) == '/'
On 25.10.2011 20:07, Christopher Schultz wrote:
Rainer,
On 10/23/2011 12:19 PM, rj...@apache.org wrote:
+static const char *find_path_in_uri(const char *uri, const char
*path) +{ +size_t len = strlen(path); +while (uri =
strchr(uri, '/')) { +uri++; +if (!strncmp(uri,
On 25.10.2011 20:03, Christopher Schultz wrote:
Rainer,
On 10/23/2011 12:19 PM, rj...@apache.org wrote:
+/* + * Find the first occurrence of path in uri tokenized by
/. + * The comparison is done case insensitive. + */ +static
const char *find_path_in_uri(const char *uri, const char *path)
All,
On 10/25/2011 2:03 PM, Christopher Schultz wrote:
On 10/23/2011 12:19 PM, rj...@apache.org wrote:
+if (!strncmp(uri, path, len)
strncmp doesn't use case-insensitive compare: will this ever match if
you use web-inf (as below)?
Duh just saw Konstantin's response. Apologies for
2011/10/25 Christopher Schultz ch...@christopherschultz.net:
All,
On 10/25/2011 2:03 PM, Christopher Schultz wrote:
On 10/23/2011 12:19 PM, rj...@apache.org wrote:
+ if (!strncmp(uri, path, len)
strncmp doesn't use case-insensitive compare: will this ever match if
you use web-inf
Rainer,
On 10/25/2011 3:37 PM, Rainer Jung wrote:
On 25.10.2011 20:07, Christopher Schultz wrote:
Rainer,
On 10/23/2011 12:19 PM, rj...@apache.org wrote:
+static const char *find_path_in_uri(const char *uri, const char
*path) +{ +size_t len = strlen(path); +while (uri =
strchr(uri,
Old code used stristr.
New code uses strncmp.
If I understand correctly, the old one is case-insensitive, while the
new one is case-sensitive.
Best regards,
Konstantin Kolinko
2011/10/23 rj...@apache.org:
Author: rjung
Date: Sun Oct 23 16:19:59 2011
New Revision: 1187916
URL:
On 24.10.2011 13:54, Konstantin Kolinko wrote:
Old code used stristr.
New code uses strncmp.
If I understand correctly, the old one is case-insensitive, while the
new one is case-sensitive.
Looks like I had tomatoes on my eyes.
Will fix.
Thanks!
Rainer