Mercurial > prosody-hg
comparison plugins/mod_compression.lua @ 6988:329d5fb8a9d3
Merge 0.10->trunk
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Thu, 10 Dec 2015 18:58:30 +0000 |
| parents | 0f633160464c |
| children | ad3dce172b01 |
comparison
equal
deleted
inserted
replaced
| 6978:30c96a5db360 | 6988:329d5fb8a9d3 |
|---|---|
| 25 end | 25 end |
| 26 | 26 |
| 27 module:hook("stream-features", function(event) | 27 module:hook("stream-features", function(event) |
| 28 local origin, features = event.origin, event.features; | 28 local origin, features = event.origin, event.features; |
| 29 if not origin.compressed and origin.type == "c2s" then | 29 if not origin.compressed and origin.type == "c2s" then |
| 30 -- FIXME only advertise compression support when TLS layer has no compression enabled | |
| 31 features:add_child(compression_stream_feature); | 30 features:add_child(compression_stream_feature); |
| 32 end | 31 end |
| 33 end); | 32 end); |
| 34 | 33 |
| 35 module:hook("s2s-stream-features", function(event) | 34 module:hook("s2s-stream-features", function(event) |
| 36 local origin, features = event.origin, event.features; | 35 local origin, features = event.origin, event.features; |
| 37 -- FIXME only advertise compression support when TLS layer has no compression enabled | |
| 38 if not origin.compressed and origin.type == "s2sin" then | 36 if not origin.compressed and origin.type == "s2sin" then |
| 39 features:add_child(compression_stream_feature); | 37 features:add_child(compression_stream_feature); |
| 40 end | 38 end |
| 41 end); | 39 end); |
| 42 | 40 |
