From cdac5ecd2d91bc4027dd0389fba6a1ba39ad3254 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 3 Jun 2011 16:58:22 +0400 Subject: [PATCH] Parse urls with '_' sign in domain name --- CMakeLists.txt | 13 +++++++------ src/url.c | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cbddacb6f..54ad52821 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,6 +25,7 @@ OPTION(ENABLE_PROFILING "Enable profiling [default: OFF]" OPTION(ENABLE_GPERF_TOOLS "Enable google perftools [default: OFF]" OFF) OPTION(ENABLE_STATIC "Enable static compiling [default: OFF]" OFF) OPTION(ENABLE_LUAJIT "Link with libluajit [default: OFF]" OFF) +OPTION(FORCE_GMIME24 "Link with gmime2.4 [default: OFF]" OFF) # Build optimized code for following CPU (default i386) #SET(CPU_TUNE "i686") @@ -202,7 +203,7 @@ ENDIF(ENABLE_STATIC MATCHES "ON") pkg_check_modules(GMIME2 gmime-2.0) # Try to link with gmime24 -IF(NOT GMIME2_FOUND OR USE_GMIME24) +IF(NOT GMIME2_FOUND OR FORCE_GMIME24) pkg_check_modules(GMIME24 REQUIRED gmime-2.4) SET(GMIME24 "yes") # Gmime2 @@ -221,7 +222,7 @@ IF(NOT GMIME2_FOUND OR USE_GMIME24) ENDIF(ENABLE_STATIC MATCHES "ON") INCLUDE_DIRECTORIES(${GMIME24_INCLUDE_DIRS}) LINK_DIRECTORIES(${GMIME24_LIBRARY_DIRS}) -ELSE(NOT GMIME2_FOUND OR USE_GMIME24) +ELSE(NOT GMIME2_FOUND OR FORCE_GMIME24) # Gmime2 FOREACH(arg ${GMIME2_CFLAGS}) SET(GMIME_CFLAGS "${GMIME_CFLAGS} ${arg}") @@ -238,7 +239,7 @@ ELSE(NOT GMIME2_FOUND OR USE_GMIME24) ENDIF(ENABLE_STATIC MATCHES "ON") INCLUDE_DIRECTORIES(${GMIME2_INCLUDE_DIRS}) LINK_DIRECTORIES(${GMIME2_LIBRARY_DIRS}) -ENDIF(NOT GMIME2_FOUND OR USE_GMIME24) +ENDIF(NOT GMIME2_FOUND OR FORCE_GMIME24) # Make from ; separated list normal space separated list # Glib2 @@ -611,10 +612,10 @@ TARGET_LINK_LIBRARIES(rspamd event) TARGET_LINK_LIBRARIES(rspamd ${CMAKE_REQUIRED_LIBRARIES}) TARGET_LINK_LIBRARIES(rspamd ${GLIB2_LIBRARIES}) -IF(GMIME2_FOUND) - TARGET_LINK_LIBRARIES(rspamd ${GMIME2_LIBRARIES}) -ELSE(GMIME2_FOUND) +IF(GMIME24) TARGET_LINK_LIBRARIES(rspamd ${GMIME24_LIBRARIES}) +ELSE(GMIME2_FOUND) + TARGET_LINK_LIBRARIES(rspamd ${GMIME2_LIBRARIES}) ENDIF(GMIME2_FOUND) IF(ENABLE_STATIC MATCHES "ON") TARGET_LINK_LIBRARIES(rspamd ${PCRE_LIBRARIES}) diff --git a/src/url.c b/src/url.c index 8282f9217..83492eaab 100644 --- a/src/url.c +++ b/src/url.c @@ -128,7 +128,7 @@ static guchar url_scanner_table[256] = { 24,128,160,128,128,128,128,128,160,160,128,128,160,192,160,160, 68, 68, 68, 68, 68, 68, 68, 68, 68, 68,160,160, 32,128, 32,128, 160, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66,160,160,160,128,128, + 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66,160,160,160,128,192, 128, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66,128,128,128,128, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, -- 2.39.5