--- parser3/src/main/pa_http.C 2010/12/29 12:17:58 1.50 +++ parser3/src/main/pa_http.C 2012/03/16 09:24:13 1.53 @@ -1,12 +1,10 @@ /** @file Parser: http support functions. - Copyright(c) 2001-2009 ArtLebedev Group (http://www.artlebedev.com) + Copyright (c) 2001-2012 Art. Lebedev Studio (http://www.artlebedev.com) Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char * const IDENT_HTTP_C="$Date: 2010/12/29 12:17:58 $"; - #include "pa_http.h" #include "pa_common.h" #include "pa_charsets.h" @@ -15,6 +13,8 @@ static const char * const IDENT_HTTP_C=" #include "pa_vfile.h" #include "pa_random.h" +volatile const char * IDENT_PA_HTTP_C="$Id: pa_http.C,v 1.53 2012/03/16 09:24:13 moko Exp $" IDENT_PA_HTTP_H; + // defines #define HTTP_METHOD_NAME "method" @@ -299,10 +299,10 @@ struct Http_pass_header_info { char *pa_http_safe_header_name(const char *name) { char *result=pa_strdup(name); char *n=result; - if(isdigit(*n)) + if(!pa_isalpha((unsigned char)*n)) *n++ = '_'; for(; *n; ++n) { - if (!isalnum(*n) && *n != '_') + if (!pa_isalnum((unsigned char)*n) && *n != '-' && *n != '_') *n = '_'; } return result;