New Upstream Snapshot - lua-http
Ready changes
Summary
Merged new upstream version: 0.4+git20210620.1.169c1a7 (was: 0.4).
Resulting package
Built on 2022-12-20T03:01 (took 7m10s)
The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:
apt install -t fresh-snapshots lua-http
Lintian Result
Diff
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
deleted file mode 100644
index 857e4da..0000000
--- a/.github/workflows/ci.yml
+++ /dev/null
@@ -1,109 +0,0 @@
-name: ci
-
-on:
- pull_request: {}
- push:
- branches: [ $default-branch ]
-
-jobs:
- luacheck:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- with:
- path: lua-http
- - uses: leafo/gh-actions-lua@v8.0.0
- - uses: leafo/gh-actions-luarocks@v4.0.0
- - name: install-tooling
- run: luarocks install luacheck
- - name: luacheck
- run: |
- cd lua-http
- luacheck .
-
- test:
- runs-on: ubuntu-latest
- strategy:
- matrix:
- luaVersion:
- - "5.1"
- - "5.2"
- - "5.3"
- - "5.4"
- - luajit-2.0.5
- - luajit-2.1.0-beta3
- luaCompileFlags: [""]
- zlib: ["", "lzlib", "lua-zlib"]
- remove_compat53: [false]
-
- exclude:
- # lzlib doesn't support Lua 5.4+
- - luaVersion: "5.4"
- zlib: "lzlib"
- include:
- - luaVersion: "5.3"
- luaCompileFlags: LUA_CFLAGS="-DLUA_INT_TYPE=LUA_INT_INT"
- - luaVersion: "5.3"
- remove_compat53: true
-
- steps:
- - uses: actions/checkout@v2
- with:
- path: lua-http
- - uses: leafo/gh-actions-lua@v8.0.0
- with:
- luaVersion: ${{ matrix.luaVersion }}
- - uses: leafo/gh-actions-luarocks@v4.0.0
- - name: install-tooling
- run: |
- luarocks install luacov-coveralls
- luarocks install busted
- - name: install-dependencies
- run: |
- cd lua-http
- luarocks install --only-deps http-scm-0.rockspec
-
- - name: install-lzlib
- if: matrix.zlib == 'lzlib'
- run: luarocks install lzlib
- - name: install-lua-zlib
- if: matrix.zlib == 'lua-zlib'
- run: luarocks install lua-zlib
-
- - name: remove-compat53
- if: matrix.remove_compat53
- run: luarocks remove compat53
-
- - name: test
- run: |
- cd lua-http
- busted -c -o utfTerminal
-
- - name: coveralls
- continue-on-error: true
- env:
- COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
- run: |
- cd lua-http
- luacov-coveralls -v
-
- typedlua:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- with:
- path: lua-http
- - uses: leafo/gh-actions-lua@v8.0.0
- with:
- luaVersion: "5.3" # tlc doesn't work with 5.4+
- - uses: leafo/gh-actions-luarocks@v4.0.0
- - name: install-tooling
- run: luarocks install https://raw.githubusercontent.com/andremm/typedlua/master/typedlua-scm-1.rockspec
- - name: install-dependencies
- run: |
- cd lua-http
- luarocks install --only-deps http-scm-0.rockspec
- - name: typedlua
- run: |
- cd lua-http
- tlc -o /dev/null spec/require-all.lua
diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index 9f43d73..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-/luacov.report.out
-/luacov.stats.out
-/*.rock
diff --git a/README.md b/README.md
index 4446042..d32b58b 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,7 @@
- Functionality for both client and server
- Cookie Management
- Websockets
- - Compatible with Lua 5.1, 5.2, 5.3 and [LuaJIT](http://luajit.org/)
+ - Compatible with Lua 5.1, 5.2, 5.3, 5.4 and [LuaJIT](http://luajit.org/)
## Documentation
diff --git a/debian/changelog b/debian/changelog
index 62c61c3..bbfc7fd 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+lua-http (0.4+git20210620.1.169c1a7-1) UNRELEASED; urgency=low
+
+ * New upstream snapshot.
+
+ -- Debian Janitor <janitor@jelmer.uk> Tue, 20 Dec 2022 02:56:00 -0000
+
lua-http (0.4-1) unstable; urgency=low
* New upstream version 0.4
diff --git a/doc/interfaces/stream.md b/doc/interfaces/stream.md
index 348025d..a6c79ea 100644
--- a/doc/interfaces/stream.md
+++ b/doc/interfaces/stream.md
@@ -61,17 +61,17 @@ Reads `n` characters (bytes) of body from the stream and return them as a string
### `stream:get_body_until(pattern, plain, include_pattern, timeout)` <!-- --> {#stream:get_body_until}
-Reads in body data from the stream until the [lua pattern](http://www.lua.org/manual/5.3/manual.html#6.4.1) `pattern` is found and returns the data as a string. `plain` is a boolean that indicates that pattern matching facilities should be turned off so that function does a plain "find substring" operation, with no characters in pattern being considered magic. `include_patterns` specifies if the pattern itself should be included in the returned string. On error, returns `nil`, an error message and an error number.
+Reads in body data from the stream until the [lua pattern](http://www.lua.org/manual/5.4/manual.html#6.4.1) `pattern` is found and returns the data as a string. `plain` is a boolean that indicates that pattern matching facilities should be turned off so that function does a plain "find substring" operation, with no characters in pattern being considered magic. `include_patterns` specifies if the pattern itself should be included in the returned string. On error, returns `nil`, an error message and an error number.
### `stream:save_body_to_file(file, timeout)` <!-- --> {#stream:save_body_to_file}
-Reads the body from the stream and saves it to the [lua file handle](http://www.lua.org/manual/5.3/manual.html#6.8) `file`. On error, returns `nil`, an error message and an error number.
+Reads the body from the stream and saves it to the [lua file handle](http://www.lua.org/manual/5.4/manual.html#6.8) `file`. On error, returns `nil`, an error message and an error number.
### `stream:get_body_as_file(timeout)` <!-- --> {#stream:get_body_as_file}
-Reads the body from the stream into a temporary file and returns a [lua file handle](http://www.lua.org/manual/5.3/manual.html#6.8). On error, returns `nil`, an error message and an error number.
+Reads the body from the stream into a temporary file and returns a [lua file handle](http://www.lua.org/manual/5.4/manual.html#6.8). On error, returns `nil`, an error message and an error number.
### `stream:unget(str)` <!-- --> {#stream:unget}
diff --git a/doc/introduction.md b/doc/introduction.md
index db2764b..de95328 100644
--- a/doc/introduction.md
+++ b/doc/introduction.md
@@ -1,6 +1,6 @@
# Introduction
-lua-http is an performant, capable HTTP and WebSocket library for Lua 5.1, 5.2, 5.3 and LuaJIT. Some of the features of the library include:
+lua-http is an performant, capable HTTP and WebSocket library for Lua 5.1, 5.2, 5.3, 5.4 and LuaJIT. Some of the features of the library include:
- Support for HTTP versions 1, 1.1 and 2 as specified by [RFC 7230](https://tools.ietf.org/html/rfc7230) and [RFC 7540](https://tools.ietf.org/html/rfc7540)
- Provides both client and server APIs
diff --git a/doc/modules/http.cookie.md b/doc/modules/http.cookie.md
index a6cd9f5..19d9884 100644
--- a/doc/modules/http.cookie.md
+++ b/doc/modules/http.cookie.md
@@ -52,7 +52,7 @@ Defaults to the [latest](https://rockdaboot.github.io/libpsl/libpsl-Public-Suffi
A function used by the `store` to get the current time for expiries and such.
-Defaults to a function based on [`os.time`](https://www.lua.org/manual/5.3/manual.html#pdf-os.time).
+Defaults to a function based on [`os.time`](https://www.lua.org/manual/5.4/manual.html#pdf-os.time).
### `store.max_cookie_length` <!-- --> {#http.cookie.store.max_cookie_length}
diff --git a/doc/modules/http.proxies.md b/doc/modules/http.proxies.md
index ac5019a..3f5b6a0 100644
--- a/doc/modules/http.proxies.md
+++ b/doc/modules/http.proxies.md
@@ -7,7 +7,7 @@ Returns an empty 'proxies' object
### `proxies:update(getenv)` <!-- --> {#http.proxies:update}
-`getenv` defaults to [`os.getenv`](http://www.lua.org/manual/5.3/manual.html#pdf-os.getenv)
+`getenv` defaults to [`os.getenv`](http://www.lua.org/manual/5.4/manual.html#pdf-os.getenv)
Reads environmental variables that are used to control if requests go through a proxy.
diff --git a/doc/modules/http.request.md b/doc/modules/http.request.md
index d1055ef..42e14e8 100644
--- a/doc/modules/http.request.md
+++ b/doc/modules/http.request.md
@@ -161,7 +161,7 @@ Allows setting a request body. `body` may be a string, function or lua file obje
- If `body` is a string it will be sent as given.
- If `body` is a function, it will be called repeatedly like an iterator. It should return chunks of the request body as a string or `nil` if done.
- - If `body` is a lua file object, it will be [`:seek`'d](http://www.lua.org/manual/5.3/manual.html#pdf-file:seek) to the start, then sent as a body. Any errors encountered during file operations **will be thrown**.
+ - If `body` is a lua file object, it will be [`:seek`'d](http://www.lua.org/manual/5.4/manual.html#pdf-file:seek) to the start, then sent as a body. Any errors encountered during file operations **will be thrown**.
### `request:go(timeout)` <!-- --> {#http.request:timeout}
diff --git a/http-0.4-0.rockspec b/http-scm-0.rockspec
similarity index 93%
rename from http-0.4-0.rockspec
rename to http-scm-0.rockspec
index 4b00671..5c9dafd 100644
--- a/http-0.4-0.rockspec
+++ b/http-scm-0.rockspec
@@ -1,5 +1,5 @@
package = "http"
-version = "0.4-0"
+version = "scm-0"
description = {
summary = "HTTP library for Lua";
@@ -8,8 +8,7 @@ description = {
}
source = {
- url = "https://github.com/daurnimator/lua-http/archive/v0.4.zip";
- dir = "lua-http-0.4";
+ url = "git+https://github.com/daurnimator/lua-http.git";
}
dependencies = {
diff --git a/http/version.lua b/http/version.lua
index 866a389..396dcf2 100644
--- a/http/version.lua
+++ b/http/version.lua
@@ -5,5 +5,5 @@ It should be updated as part of the release process
return {
name = "lua-http";
- version = "0.4";
+ version = "scm";
}
diff --git a/spec/client_spec.lua b/spec/client_spec.lua
index daae1e9..923d676 100644
--- a/spec/client_spec.lua
+++ b/spec/client_spec.lua
@@ -52,7 +52,7 @@ describe("http.client module", function()
s:close()
end
local function new_server_ctx()
- local key = openssl_pkey.new()
+ local key = openssl_pkey.new({type="RSA", bits=2048})
local crt = openssl_x509.new()
crt:setPublicKey(key)
crt:sign(key)
diff --git a/spec/cookie_spec.lua b/spec/cookie_spec.lua
index d80c93e..b8866fd 100644
--- a/spec/cookie_spec.lua
+++ b/spec/cookie_spec.lua
@@ -26,7 +26,7 @@ describe("cookie module", function()
it(":get works", function()
local s = http_cookie.new_store()
assert.same(nil, s:get("mysite.com", "/", "lang"))
- local key, value, params = http_cookie.parse_setcookie("lang=en-US; Expires=Wed, 09 Jun 2021 10:18:14 GMT")
+ local key, value, params = http_cookie.parse_setcookie("lang=en-US; Expires=Wed, 09 Jun 2121 10:18:14 GMT")
assert(s:store("mysite.com", "/", true, true, nil, key, value, params))
assert.same("en-US", s:get("mysite.com", "/", "lang"))
assert.same(nil, s:get("other.com", "/", "lang"))
@@ -68,7 +68,7 @@ describe("cookie module", function()
s.time = function() return 1234567890 end -- set time to something before the expiry
-- in spec this is kept from previous example.
assert(s:store("example.com", "/", true, true, nil, http_cookie.parse_setcookie("SID=31d4d96e407aad42; Path=/; Secure; HttpOnly")))
- assert(s:store("example.com", "/", true, true, nil, http_cookie.parse_setcookie("lang=en-US; Expires=Wed, 09 Jun 2021 10:18:14 GMT")))
+ assert(s:store("example.com", "/", true, true, nil, http_cookie.parse_setcookie("lang=en-US; Expires=Wed, 09 Jun 2121 10:18:14 GMT")))
assert.same("SID=31d4d96e407aad42; lang=en-US", s:lookup("example.com", "/", true, true))
s.time = function() return 9234567890 end -- set time to something after the expiry
assert.same("SID=31d4d96e407aad42", s:lookup("example.com", "/", true, true))
@@ -251,7 +251,7 @@ describe("cookie module", function()
end)
it("cleans up", function()
local s = http_cookie.new_store()
- assert.truthy(s:store("example.com", "/", true, true, nil, http_cookie.parse_setcookie("foo=foo; Expires=Wed, 09 Jun 2021 10:18:14 GMT")))
+ assert.truthy(s:store("example.com", "/", true, true, nil, http_cookie.parse_setcookie("foo=foo; Expires=Wed, 09 Jun 2121 10:18:14 GMT")))
assert.same("foo", s:get("example.com", "/", "foo"))
s.time = function() return 9876543210 end -- set time to something after the expiry
s:clean()
diff --git a/spec/tls_spec.lua b/spec/tls_spec.lua
index 3be6673..014b5dc 100644
--- a/spec/tls_spec.lua
+++ b/spec/tls_spec.lua
@@ -17,18 +17,19 @@ describe("http.tls module", function()
local s, c = ca.assert(cs.pair())
local cq = cqueues.new()
cq:wrap(function()
- local ctx = openssl_ctx.new("TLSv1", false)
+ local ctx = openssl_ctx.new("TLS", false)
assert(c:starttls(ctx))
local ssl = assert(s:checktls())
local cipher = ssl:getCipherInfo()
assert(tls.banned_ciphers[cipher.name])
end)
cq:wrap(function()
- local ctx = openssl_ctx.new("TLSv1", true)
+ local ctx = openssl_ctx.new("TLS", true)
+ ctx:setOptions(openssl_ctx.OP_NO_TLSv1_3)
ctx:setCipherList(banned_cipher_list)
ctx:setEphemeralKey(openssl_pkey.new{ type = "EC", curve = "prime256v1" })
local crt = openssl_x509.new()
- local key = openssl_pkey.new()
+ local key = openssl_pkey.new({type="RSA", bits=2048})
crt:setPublicKey(key)
crt:sign(key)
assert(ctx:setPrivateKey(key))
Debdiff
File lists identical (after any substitutions)
No differences were encountered in the control files