Mercurial > hg > nginx-quic
annotate src/os/unix/ngx_sunpro_sparc64.il @ 8366:6df9d7df2784
gRPC: fixed handling of padding on DATA frames.
The response size check introduced in 39501ce97e29 did not take into
account possible padding on DATA frames, resulting in incorrect
"upstream sent response body larger than indicated content length" errors
if upstream server used padding in responses with known length.
Fix is to check the actual size of response buffers produced by the code,
similarly to how it is done in other protocols, instead of checking
the size of DATA frames.
Reported at:
http://mailman.nginx.org/pipermail/nginx-devel/2021-March/013907.html
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Tue, 23 Mar 2021 16:52:23 +0300 |
parents | d620f497c50f |
children |
rev | line source |
---|---|
561 | 1 / |
2 / Copyright (C) Igor Sysoev | |
4412 | 3 / Copyright (C) Nginx, Inc. |
561 | 4 / |
5 | |
6 | |
7 / "casa [%o2] 0x80, %o1, %o0" and | |
8 / "casxa [%o2] 0x80, %o1, %o0" do the following: | |
577 | 9 / |
561 | 10 / if ([%o2] == %o1) { |
11 / swap(%o0, [%o2]); | |
12 / } else { | |
13 / %o0 = [%o2]; | |
14 / } | |
15 | |
16 | |
17 / ngx_atomic_uint_t ngx_casa(ngx_atomic_uint_t set, ngx_atomic_uint_t old, | |
18 / ngx_atomic_t *lock); | |
19 / | |
20 / the arguments are passed in the %o0, %o1, %o2 | |
21 / the result is returned in the %o0 | |
22 | |
23 .inline ngx_casa,0 | |
24 casa [%o2] 0x80, %o1, %o0 | |
25 .end | |
26 | |
27 | |
28 / ngx_atomic_uint_t ngx_casxa(ngx_atomic_uint_t set, ngx_atomic_uint_t old, | |
29 / ngx_atomic_t *lock); | |
30 / | |
31 / the arguments are passed in the %o0, %o1, %o2 | |
32 / the result is returned in the %o0 | |
33 | |
34 .inline ngx_casxa,0 | |
35 casxa [%o2] 0x80, %o1, %o0 | |
36 .end |