Software / code / prosody
Comparison
net/http/parser.lua @ 11727:f3aee8a825cc
Fix various spelling errors (thanks codespell)
Also special thanks to timeless, for wordlessly reminding me to check
for typos.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Tue, 27 Jul 2021 00:13:18 +0200 |
| parent | 11184:2ede7f43ccfe |
| child | 12882:9ed628635dc6 |
comparison
equal
deleted
inserted
replaced
| 11726:76156c675456 | 11727:f3aee8a825cc |
|---|---|
| 28 function httpstream.new(success_cb, error_cb, parser_type, options_cb) | 28 function httpstream.new(success_cb, error_cb, parser_type, options_cb) |
| 29 local client = true; | 29 local client = true; |
| 30 if not parser_type or parser_type == "server" then client = false; else assert(parser_type == "client", "Invalid parser type"); end | 30 if not parser_type or parser_type == "server" then client = false; else assert(parser_type == "client", "Invalid parser type"); end |
| 31 local bodylimit = tonumber(options_cb and options_cb().body_size_limit) or 10*1024*1024; | 31 local bodylimit = tonumber(options_cb and options_cb().body_size_limit) or 10*1024*1024; |
| 32 -- https://stackoverflow.com/a/686243 | 32 -- https://stackoverflow.com/a/686243 |
| 33 -- Indiviual headers can be up to 16k? What madness? | 33 -- Individual headers can be up to 16k? What madness? |
| 34 local headlimit = tonumber(options_cb and options_cb().head_size_limit) or 10*1024; | 34 local headlimit = tonumber(options_cb and options_cb().head_size_limit) or 10*1024; |
| 35 local buflimit = tonumber(options_cb and options_cb().buffer_size_limit) or bodylimit * 2; | 35 local buflimit = tonumber(options_cb and options_cb().buffer_size_limit) or bodylimit * 2; |
| 36 local buffer = dbuffer.new(buflimit); | 36 local buffer = dbuffer.new(buflimit); |
| 37 local chunked; | 37 local chunked; |
| 38 local state = nil; | 38 local state = nil; |