nginx-0.1.0-2004-09-30-10:38:49 import
Igor Sysoev
17 years ago
44 | 44 |
if [ $HTTP_REWRITE = YES ]; then
|
45 | 45 |
if [ $PCRE = NONE -o $PCRE = NO ]; then
|
46 | 46 |
echo "$0: error: HTTP rewrite module requires PCRE library."
|
47 | |
echo $ngx_n "You can disable the module by using" $ngx_c
|
|
47 |
echo $ngx_n "You can disable the module by using " $ngx_c
|
48 | 48 |
echo "--without-http_rewrite_module option"
|
49 | |
echo "or you have to enable PCRE support"
|
|
49 |
echo "or you have to enable PCRE support."
|
50 | 50 |
echo
|
51 | 51 |
|
52 | 52 |
exit 1
|
|
57 | 57 |
if [ $HTTP_GZIP = YES ]; then
|
58 | 58 |
if [ $ZLIB = NONE -o $ZLIB = NO ]; then
|
59 | 59 |
echo "$0: error: HTTP gzip module requires zlib library."
|
60 | |
echo $ngx_n "You can disable the module by using" $ngx_c
|
|
60 |
echo $ngx_n "You can disable the module by using " $ngx_c
|
61 | 61 |
echo "--without-http_gzip_module option"
|
62 | |
echo "or you have to enable zlib support"
|
|
62 |
echo "or you have to enable zlib support."
|
63 | 63 |
echo
|
64 | 64 |
|
65 | 65 |
exit 1
|
57 | 57 |
#include <ngx_regex.h>
|
58 | 58 |
#endif
|
59 | 59 |
#include <ngx_rbtree.h>
|
60 | |
#include <ngx_radix_tree.h>
|
61 | 60 |
#include <ngx_times.h>
|
62 | 61 |
#include <ngx_inet.h>
|
63 | 62 |
#include <ngx_cycle.h>
|
252 | 252 |
#endif
|
253 | 253 |
|
254 | 254 |
ngx_log.file = &ngx_stderr;
|
|
255 |
|
|
256 |
#ifdef NGX_ERROR_LOG_PATH
|
|
257 |
|
255 | 258 |
ngx_log.log_level = NGX_LOG_ERR;
|
256 | |
|
257 | |
#ifdef NGX_ERROR_LOG_PATH
|
258 | 259 |
|
259 | 260 |
fd = ngx_open_file(NGX_ERROR_LOG_PATH, NGX_FILE_RDWR,
|
260 | 261 |
NGX_FILE_CREATE_OR_OPEN|NGX_FILE_APPEND);
|
|
283 | 284 |
}
|
284 | 285 |
|
285 | 286 |
#endif
|
|
287 |
|
|
288 |
#else
|
|
289 |
|
|
290 |
ngx_log.log_level = NGX_LOG_INFO;
|
286 | 291 |
|
287 | 292 |
#endif
|
288 | 293 |
|
|
374 | 379 |
|
375 | 380 |
value = cf->args->elts;
|
376 | 381 |
|
377 | |
cf->cycle->new_log->file->name = value[1];
|
378 | |
|
379 | |
if (ngx_conf_full_name(cf->cycle, &cf->cycle->new_log->file->name)
|
|
382 |
if (value[1].len == 6 && ngx_strcmp(value[1].data, "stderr") == 0) {
|
|
383 |
cf->cycle->new_log->file->fd = ngx_stderr.fd;
|
|
384 |
cf->cycle->new_log->file->name.len = 0;
|
|
385 |
cf->cycle->new_log->file->name.data = NULL;
|
|
386 |
|
|
387 |
} else {
|
|
388 |
cf->cycle->new_log->file->name = value[1];
|
|
389 |
|
|
390 |
if (ngx_conf_full_name(cf->cycle, &cf->cycle->new_log->file->name)
|
380 | 391 |
== NGX_ERROR)
|
381 | |
{
|
382 | |
return NGX_CONF_ERROR;
|
|
392 |
{
|
|
393 |
return NGX_CONF_ERROR;
|
|
394 |
}
|
383 | 395 |
}
|
384 | 396 |
|
385 | 397 |
return ngx_set_error_log_levels(cf, cf->cycle->new_log);
|
81 | 81 |
return NGX_AGAIN;
|
82 | 82 |
}
|
83 | 83 |
|
|
84 |
if (sslerr == SSL_ERROR_WANT_WRITE) {
|
|
85 |
ngx_log_error(NGX_LOG_ALERT, c->log, err,
|
|
86 |
"SSL wants to write%s", handshake);
|
|
87 |
return NGX_ERROR;
|
84 | 88 |
#if 0
|
85 | |
if (sslerr == SSL_ERROR_WANT_WRITE) {
|
86 | |
return NGX_AGAIN;
|
87 | |
}
|
|
89 |
return NGX_AGAIN;
|
88 | 90 |
#endif
|
|
91 |
}
|
89 | 92 |
|
90 | 93 |
if (!SSL_is_init_finished(c->ssl->ssl)) {
|
91 | 94 |
handshake = "in SSL handshake";
|
|
260 | 263 |
return NGX_AGAIN;
|
261 | 264 |
}
|
262 | 265 |
|
|
266 |
if (sslerr == SSL_ERROR_WANT_READ) {
|
|
267 |
ngx_log_error(NGX_LOG_ALERT, c->log, err,
|
|
268 |
"SSL wants to read%s", handshake);
|
|
269 |
return NGX_ERROR;
|
263 | 270 |
#if 0
|
264 | |
if (sslerr == SSL_ERROR_WANT_READ) {
|
265 | 271 |
return NGX_AGAIN;
|
266 | 272 |
}
|
267 | 273 |
#endif
|