comparison src/http/ngx_http_request.c @ 5200:9d83ec073c51

Fixed build with --with-mail_ssl_module. If nginx was compiled without --with-http_ssl_module, but with some other module which uses OpenSSL (e.g. --with-mail_ssl_module), insufficient preprocessor check resulted in build failure. The problem was introduced by e0a3714a36f8 (1.3.14). Reported by Roman Arutyunyan.
author Maxim Dounin <mdounin@mdounin.ru>
date Sat, 11 May 2013 18:49:30 +0400
parents c0f7b94e88ba
children ea2ba6dbe361 462ae7eedc68
comparison
equal deleted inserted replaced
5199:3494f14aa46a 5200:9d83ec073c51
1953 ngx_http_core_loc_conf_t *clcf; 1953 ngx_http_core_loc_conf_t *clcf;
1954 ngx_http_core_srv_conf_t *cscf; 1954 ngx_http_core_srv_conf_t *cscf;
1955 1955
1956 hc = r->http_connection; 1956 hc = r->http_connection;
1957 1957
1958 #ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME 1958 #if (NGX_HTTP_SSL && defined SSL_CTRL_SET_TLSEXT_HOSTNAME)
1959 1959
1960 if (hc->ssl_servername) { 1960 if (hc->ssl_servername) {
1961 if (hc->ssl_servername->len == host->len 1961 if (hc->ssl_servername->len == host->len
1962 && ngx_strncmp(hc->ssl_servername->data, 1962 && ngx_strncmp(hc->ssl_servername->data,
1963 host->data, host->len) == 0) 1963 host->data, host->len) == 0)
1984 if (rc == NGX_ERROR) { 1984 if (rc == NGX_ERROR) {
1985 ngx_http_close_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR); 1985 ngx_http_close_request(r, NGX_HTTP_INTERNAL_SERVER_ERROR);
1986 return NGX_ERROR; 1986 return NGX_ERROR;
1987 } 1987 }
1988 1988
1989 #ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME 1989 #if (NGX_HTTP_SSL && defined SSL_CTRL_SET_TLSEXT_HOSTNAME)
1990 1990
1991 if (hc->ssl_servername) { 1991 if (hc->ssl_servername) {
1992 ngx_http_ssl_srv_conf_t *sscf; 1992 ngx_http_ssl_srv_conf_t *sscf;
1993 1993
1994 if (rc == NGX_DECLINED) { 1994 if (rc == NGX_DECLINED) {
2051 ngx_uint_t i; 2051 ngx_uint_t i;
2052 ngx_http_server_name_t *sn; 2052 ngx_http_server_name_t *sn;
2053 2053
2054 sn = virtual_names->regex; 2054 sn = virtual_names->regex;
2055 2055
2056 #ifdef SSL_CTRL_SET_TLSEXT_HOSTNAME 2056 #if (NGX_HTTP_SSL && defined SSL_CTRL_SET_TLSEXT_HOSTNAME)
2057 2057
2058 if (r == NULL) { 2058 if (r == NULL) {
2059 ngx_http_connection_t *hc; 2059 ngx_http_connection_t *hc;
2060 2060
2061 for (i = 0; i < virtual_names->nregex; i++) { 2061 for (i = 0; i < virtual_names->nregex; i++) {
2083 } 2083 }
2084 2084
2085 return NGX_DECLINED; 2085 return NGX_DECLINED;
2086 } 2086 }
2087 2087
2088 #endif /* SSL_CTRL_SET_TLSEXT_HOSTNAME */ 2088 #endif /* NGX_HTTP_SSL && defined SSL_CTRL_SET_TLSEXT_HOSTNAME */
2089 2089
2090 for (i = 0; i < virtual_names->nregex; i++) { 2090 for (i = 0; i < virtual_names->nregex; i++) {
2091 2091
2092 n = ngx_http_regex_exec(r, sn[i].regex, host); 2092 n = ngx_http_regex_exec(r, sn[i].regex, host);
2093 2093