comparison src/core/ngx_syslog.c @ 5922:68f64bc17fa4

Syslog: allowed underscore symbol in tag (ticket #667).
author Vladimir Homutov <vl@nginx.com>
date Thu, 20 Nov 2014 20:02:21 +0300
parents 02c2352d5b01
children a6a2016b8e31
comparison
equal deleted inserted replaced
5921:5004210e8c78 5922:68f64bc17fa4
180 } 180 }
181 181
182 for (i = 4; i < len; i++) { 182 for (i = 4; i < len; i++) {
183 c = ngx_tolower(p[i]); 183 c = ngx_tolower(p[i]);
184 184
185 if (c < '0' || (c > '9' && c < 'a') || c > 'z') { 185 if (c < '0' || (c > '9' && c < 'a' && c != '_') || c > 'z') {
186 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0, 186 ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
187 "syslog \"tag\" only allows " 187 "syslog \"tag\" only allows "
188 "alphanumeric characters"); 188 "alphanumeric characters "
189 "and underscore");
189 return NGX_CONF_ERROR; 190 return NGX_CONF_ERROR;
190 } 191 }
191 } 192 }
192 193
193 peer->tag.data = p + 4; 194 peer->tag.data = p + 4;