Mercurial > hg > nginx-quic
annotate auto/lib/libatomic/conf @ 7034:1b068a4e82d8
Added support for trailers in HTTP responses.
Example:
ngx_table_elt_t *h;
h = ngx_list_push(&r->headers_out.trailers);
if (h == NULL) {
return NGX_ERROR;
}
ngx_str_set(&h->key, "Fun");
ngx_str_set(&h->value, "with trailers");
h->hash = ngx_hash_key_lc(h->key.data, h->key.len);
The code above adds "Fun: with trailers" trailer to the response.
Modules that want to emit trailers must set r->expect_trailers = 1
in header filter, otherwise they might not be emitted for HTTP/1.1
responses that aren't already chunked.
This change also adds $sent_trailer_* variables.
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
author | Piotr Sikora <piotrsikora@google.com> |
---|---|
date | Fri, 24 Mar 2017 03:37:34 -0700 |
parents | d620f497c50f |
children |
rev | line source |
---|---|
3363 | 1 |
2 # Copyright (C) Igor Sysoev | |
4412 | 3 # Copyright (C) Nginx, Inc. |
3363 | 4 |
5 | |
6 if [ $NGX_LIBATOMIC != YES ]; then | |
7 | |
8 have=NGX_HAVE_LIBATOMIC . auto/have | |
9 CORE_INCS="$CORE_INCS $NGX_LIBATOMIC/src" | |
10 LINK_DEPS="$LINK_DEPS $NGX_LIBATOMIC/src/libatomic_ops.a" | |
11 CORE_LIBS="$CORE_LIBS $NGX_LIBATOMIC/src/libatomic_ops.a" | |
12 | |
13 else | |
14 | |
15 ngx_feature="atomic_ops library" | |
16 ngx_feature_name=NGX_HAVE_LIBATOMIC | |
3366 | 17 ngx_feature_run=yes |
3378
5d17022a1e88
fix libatomic usage on arm, cris, hppa, m68k, and sparc platforms
Igor Sysoev <igor@sysoev.ru>
parents:
3366
diff
changeset
|
18 ngx_feature_incs="#define AO_REQUIRE_CAS |
5d17022a1e88
fix libatomic usage on arm, cris, hppa, m68k, and sparc platforms
Igor Sysoev <igor@sysoev.ru>
parents:
3366
diff
changeset
|
19 #include <atomic_ops.h>" |
3363 | 20 ngx_feature_path= |
21 ngx_feature_libs="-latomic_ops" | |
3366 | 22 ngx_feature_test="long n = 0; |
23 if (!AO_compare_and_swap(&n, 0, 1)) | |
24 return 1; | |
25 if (AO_fetch_and_add(&n, 1) != 1) | |
26 return 1; | |
27 if (n != 2) | |
28 return 1; | |
3363 | 29 AO_nop();" |
30 . auto/feature | |
31 | |
32 if [ $ngx_found = yes ]; then | |
33 CORE_LIBS="$CORE_LIBS $ngx_feature_libs" | |
34 else | |
35 | |
36 cat << END | |
37 | |
38 $0: error: libatomic_ops library was not found. | |
39 | |
40 END | |
41 exit 1 | |
42 fi | |
43 fi |