From 9f32b22f154f8757e200159eaf2b7cbb76284a73 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 30 May 2013 21:00:27 +0200 Subject: match protocol case insensitive --- cqrlogo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cqrlogo.c b/cqrlogo.c index 45c006d..dd78211 100644 --- a/cqrlogo.c +++ b/cqrlogo.c @@ -75,8 +75,8 @@ int main(int argc, char **argv) { } /* prepare pattern matching */ - pattern = malloc(10 + strlen(server_name)); - sprintf(pattern, "^http://%s/", server_name); + pattern = malloc(22 + strlen(server_name)); + sprintf(pattern, "^[hH][tT][tT][pP]://%s/", server_name); if ((rc = regcomp(&preg, pattern, 0)) != 0) fprintf(stderr, "regcomp() failed, returning nonzero (%d)\n", rc); -- cgit v1.2.3-70-g09d2