]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Handle DOS/Windows formatted config file with wrong line terminators
authorserassio <>
Mon, 25 Apr 2005 21:46:35 +0000 (21:46 +0000)
committerserassio <>
Mon, 25 Apr 2005 21:46:35 +0000 (21:46 +0000)
src/cache_cf.cc

index dea4b85e8fe1bf9976bfe0dab20208677891a58a..deea028773164149b607b263f7755bbd36937e78 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cache_cf.cc,v 1.470 2005/04/23 12:28:11 serassio Exp $
+ * $Id: cache_cf.cc,v 1.471 2005/04/25 15:46:35 serassio Exp $
  *
  * DEBUG: section 3     Configuration File Parsing
  * AUTHOR: Harvest Derived
@@ -298,6 +298,9 @@ parseConfigFile(const char *file_name)
         if ((token = strchr(config_input_line, '\n')))
             *token = '\0';
 
+        if ((token = strchr(config_input_line, '\r')))
+            *token = '\0';
+
         if (strncmp(config_input_line, "#line ", 6) == 0) {
             static char new_file_name[1024];
             static char *file;