comparison src/http/ngx_http_core_module.c @ 4947:4251e72b8bb4

Allow the complex value to be defined as an empty string. This makes conversion from strings to complex values possible without the loss of functionality.
author Ruslan Ermilov <ru@nginx.com>
date Thu, 06 Dec 2012 23:03:53 +0000
parents 6f085bfcdb4d
children 44fcb9677c3f
comparison
equal deleted inserted replaced
4946:2570296374b4 4947:4251e72b8bb4
4591 return NGX_CONF_ERROR; 4591 return NGX_CONF_ERROR;
4592 } 4592 }
4593 4593
4594 ngx_str_null(&args); 4594 ngx_str_null(&args);
4595 4595
4596 if (cv.lengths == NULL && uri.data[0] == '/') { 4596 if (cv.lengths == NULL && uri.len && uri.data[0] == '/') {
4597 p = (u_char *) ngx_strchr(uri.data, '?'); 4597 p = (u_char *) ngx_strchr(uri.data, '?');
4598 4598
4599 if (p) { 4599 if (p) {
4600 cv.value.len = p - uri.data; 4600 cv.value.len = p - uri.data;
4601 cv.value.data = uri.data; 4601 cv.value.data = uri.data;