Mercurial > prosody-hg
comparison tools/http-status-codes.lua @ 13142:879a6a33c21b
tools: Update imports to use new prosody.* namespace
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Thu, 08 Jun 2023 09:37:01 +0200 |
| parents | f31bb79f51d7 |
| children |
comparison
equal
deleted
inserted
replaced
| 13141:451cb119026e | 13142:879a6a33c21b |
|---|---|
| 1 -- Generate net/http/codes.lua from IANA HTTP status code registry | 1 -- Generate net/http/codes.lua from IANA HTTP status code registry |
| 2 if not pcall(require, "prosody.loader") then | |
| 3 pcall(require, "loader"); | |
| 4 end | |
| 2 | 5 |
| 3 local xml = require "util.xml"; | 6 local xml = require "prosody.util.xml"; |
| 4 local registry = xml.parse(io.read("*a"), { allow_processing_instructions = true }); | 7 local registry = xml.parse(io.read("*a"), { allow_processing_instructions = true }); |
| 5 | 8 |
| 6 io.write([[ | 9 io.write([[ |
| 7 | 10 |
| 8 local response_codes = { | 11 local response_codes = { |
