annotate src/core/ngx_parse_time.h @ 6768:d9c180fcbfa7 stable-1.10

Event pipe: do not set file's thread_handler if not needed. This fixes a problem with aio threads and sendfile with aio_write switched off, as observed with range requests after fc72784b1f52 (1.9.13). Potential problems with sendfile in threads were previously described in 9fd738b85fad, and this seems to be one of them. The problem occurred as file's thread_handler was set to NULL by event pipe code after a sendfile thread task was scheduled. As a result, no sendfile completion code was executed, and the same buffer was additionally sent using non-threaded sendfile. Fix is to avoid modifying file's thread_handler if aio_write is switched off. Note that with "aio_write on" it is still possible that sendfile will use thread_handler as set by event pipe. This is believed to be safe though, as handlers used are compatible.
author Maxim Dounin <mdounin@mdounin.ru>
date Thu, 01 Sep 2016 20:05:23 +0300
parents 8b6fa4842133
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6180
8b6fa4842133 Moved ngx_http_parse_time() to core, renamed accordingly.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
1
8b6fa4842133 Moved ngx_http_parse_time() to core, renamed accordingly.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
2 /*
8b6fa4842133 Moved ngx_http_parse_time() to core, renamed accordingly.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
3 * Copyright (C) Igor Sysoev
8b6fa4842133 Moved ngx_http_parse_time() to core, renamed accordingly.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
4 * Copyright (C) Nginx, Inc.
8b6fa4842133 Moved ngx_http_parse_time() to core, renamed accordingly.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
5 */
8b6fa4842133 Moved ngx_http_parse_time() to core, renamed accordingly.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
6
8b6fa4842133 Moved ngx_http_parse_time() to core, renamed accordingly.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
7
8b6fa4842133 Moved ngx_http_parse_time() to core, renamed accordingly.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
8 #ifndef _NGX_PARSE_TIME_H_INCLUDED_
8b6fa4842133 Moved ngx_http_parse_time() to core, renamed accordingly.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
9 #define _NGX_PARSE_TIME_H_INCLUDED_
8b6fa4842133 Moved ngx_http_parse_time() to core, renamed accordingly.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
10
8b6fa4842133 Moved ngx_http_parse_time() to core, renamed accordingly.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
11
8b6fa4842133 Moved ngx_http_parse_time() to core, renamed accordingly.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
12 #include <ngx_config.h>
8b6fa4842133 Moved ngx_http_parse_time() to core, renamed accordingly.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
13 #include <ngx_core.h>
8b6fa4842133 Moved ngx_http_parse_time() to core, renamed accordingly.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
14
8b6fa4842133 Moved ngx_http_parse_time() to core, renamed accordingly.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
15
8b6fa4842133 Moved ngx_http_parse_time() to core, renamed accordingly.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
16 time_t ngx_parse_http_time(u_char *value, size_t len);
8b6fa4842133 Moved ngx_http_parse_time() to core, renamed accordingly.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
17
8b6fa4842133 Moved ngx_http_parse_time() to core, renamed accordingly.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
18 /* compatibility */
8b6fa4842133 Moved ngx_http_parse_time() to core, renamed accordingly.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
19 #define ngx_http_parse_time(value, len) ngx_parse_http_time(value, len)
8b6fa4842133 Moved ngx_http_parse_time() to core, renamed accordingly.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
20
8b6fa4842133 Moved ngx_http_parse_time() to core, renamed accordingly.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
21
8b6fa4842133 Moved ngx_http_parse_time() to core, renamed accordingly.
Maxim Dounin <mdounin@mdounin.ru>
parents:
diff changeset
22 #endif /* _NGX_PARSE_TIME_H_INCLUDED_ */