From 4ffc54396f64b88a7e438298f0bcddb661fdc625 Mon Sep 17 00:00:00 2001 From: Nigro Simone Date: Tue, 17 Nov 2026 20:37:58 +0100 Subject: [PATCH] fulmine.js - uwsLite: compliance suite (h1) and resilience Signed-off-by: Nigro Simone --- frameworks/fulmine-uwslite/app.js | 18 ++++++++++++++++++ frameworks/fulmine-uwslite/meta.json | 2 ++ 2 files changed, 20 insertions(+) diff --git a/frameworks/fulmine-uwslite/app.js b/frameworks/fulmine-uwslite/app.js index 6ff7687e41..89c0cf7241 100644 --- a/frameworks/fulmine-uwslite/app.js +++ b/frameworks/fulmine-uwslite/app.js @@ -59,6 +59,24 @@ const json = (req, res) => { app.uwsLite.get('/json/:count', { compress }, json); +// /spec, the compliance route for Http11Probe. A HEAD goes to the Express route lite registers. +const specHeaders = (req, res) => { + let out = ''; + for (const name in req.headers) out += name + ': ' + req.headers[name] + '\n'; + res.type('text/plain').send(out); +}; +app.uwsLite.get('/spec', (req, res) => { + res.type('text/plain').send('spec ok'); +}); +app.uwsLite.options('/spec', { body: 'lent' }, (req, res) => { + res.set('allow', 'GET, HEAD, POST, OPTIONS').end(); +}); +app.uwsLite.post('/spec', { body: 'lent', limit: '1mb' }, (req, res) => { + res.type('application/octet-stream').send(req.body); +}); +app.uwsLite.get('/spec/headers', { headers: true }, specHeaders); +app.uwsLite.post('/spec/headers', { body: 'lent', headers: true }, specHeaders); + // json-tls and 8gbit over TLS on 8081, when the harness mounts the certs. json-tls never sends // Accept-Encoding, so this route has no compress. The echo answers while the body is lent. if (fs.existsSync('/certs/server.key') && fs.existsSync('/certs/server.crt')) { diff --git a/frameworks/fulmine-uwslite/meta.json b/frameworks/fulmine-uwslite/meta.json index 9e20f77271..a5564706ab 100644 --- a/frameworks/fulmine-uwslite/meta.json +++ b/frameworks/fulmine-uwslite/meta.json @@ -14,6 +14,8 @@ "repo": "https://github.com/nigrosimone/fulmine.js", "website": "https://fulmine.sndesign.it/", "enabled": true, + "resilience": true, + "spec": ["h1"], "tests": [ "baseline", "limited-conn",