comparison src/http/modules/perl/nginx.xs @ 5306:43900b822890

Perl: fixed syntax usage for C preprocessor directives. As per perlxs, C preprocessor directives should be at the first non-whitespace of a line to avoid interpreting them as comments. #if and #endif are moved so that there are no blank lines before them to retain them as part of the function body.
author Sergey Kandaurov <pluknet@nginx.com>
date Mon, 29 Jul 2013 17:30:01 +0400
parents f5626ab8cb87
children 5f2a0739da19
comparison
equal deleted inserted replaced
5305:12b750d35162 5306:43900b822890
259 259
260 if (hh->offset == offsetof(ngx_http_headers_in_t, cookies)) { 260 if (hh->offset == offsetof(ngx_http_headers_in_t, cookies)) {
261 sep = ';'; 261 sep = ';';
262 goto multi; 262 goto multi;
263 } 263 }
264 264 #if (NGX_HTTP_X_FORWARDED_FOR)
265 #if (NGX_HTTP_X_FORWARDED_FOR)
266 if (hh->offset == offsetof(ngx_http_headers_in_t, x_forwarded_for)) { 265 if (hh->offset == offsetof(ngx_http_headers_in_t, x_forwarded_for)) {
267 sep = ','; 266 sep = ',';
268 goto multi; 267 goto multi;
269 } 268 }
270 #endif 269 #endif
271 270
272 if (hh->offset) { 271 if (hh->offset) {
273 272
274 ph = (ngx_table_elt_t **) ((char *) &r->headers_in + hh->offset); 273 ph = (ngx_table_elt_t **) ((char *) &r->headers_in + hh->offset);
275 274
896 895
897 hash = ngx_hash_strlow(lowcase, p, len); 896 hash = ngx_hash_strlow(lowcase, p, len);
898 897
899 var.len = len; 898 var.len = len;
900 var.data = lowcase; 899 var.data = lowcase;
901 900 #if (NGX_DEBUG)
902 #if (NGX_DEBUG)
903 901
904 if (value) { 902 if (value) {
905 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 903 ngx_log_debug2(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
906 "perl variable: \"%V\"=\"%V\"", &var, &val); 904 "perl variable: \"%V\"=\"%V\"", &var, &val);
907 } else { 905 } else {
908 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0, 906 ngx_log_debug1(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
909 "perl variable: \"%V\"", &var); 907 "perl variable: \"%V\"", &var);
910 } 908 }
911 909 #endif
912 #endif
913 910
914 vv = ngx_http_get_variable(r, &var, hash); 911 vv = ngx_http_get_variable(r, &var, hash);
915 if (vv == NULL) { 912 if (vv == NULL) {
916 XSRETURN_UNDEF; 913 XSRETURN_UNDEF;
917 } 914 }