Mercurial > prosody-hg
comparison net/http.lua @ 10464:8d3acf16c404
net.http: Set ALPN on requests
Shouldn't hurt. Revert if it turns out it does.
Supported in LuaSec 0.8. Should be ignored otherwise.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Fri, 29 Nov 2019 23:25:59 +0100 |
| parents | 6c804b6b2ca2 |
| children | 71d04bd6cadd |
comparison
equal
deleted
inserted
replaced
| 10463:fbeb7a3fc4eb | 10464:8d3acf16c404 |
|---|---|
| 283 }; | 283 }; |
| 284 return http; | 284 return http; |
| 285 end | 285 end |
| 286 | 286 |
| 287 local default_http = new({ | 287 local default_http = new({ |
| 288 sslctx = { mode = "client", protocol = "sslv23", options = { "no_sslv2", "no_sslv3" } }; | 288 sslctx = { mode = "client", protocol = "sslv23", options = { "no_sslv2", "no_sslv3" }, alpn = "http/1.1" }; |
| 289 suppress_errors = true; | 289 suppress_errors = true; |
| 290 }); | 290 }); |
| 291 | 291 |
| 292 return { | 292 return { |
| 293 request = function (u, ex, callback) | 293 request = function (u, ex, callback) |
