mod_http: Simplify conversion of Set to Array
authorKim Alvefur <zash@zash.se>
Sat, 10 Jun 2023 12:18:09 +0200
changeset 13144 7a6874f9fd40
parent 13141 b417a49cc31b
child 13145 451cb119026e
mod_http: Simplify conversion of Set to Array Avoids the _items semi-private value, that is used everywhere for some reason.
plugins/mod_http.lua
--- a/plugins/mod_http.lua	Fri May 14 05:49:35 2021 +0200
+++ b/plugins/mod_http.lua	Sat Jun 10 12:18:09 2023 +0200
@@ -115,7 +115,7 @@
 end
 
 local function header_set_tostring(header_value)
-	return array(pairs(header_value._items)):concat(", ");
+	return array(header_value:items()):concat(", ");
 end
 
 local function apply_cors_headers(response, methods, headers, max_age, allow_credentials, allowed_origins, origin)