Skip to content

Commit ef21078

Browse files
committed
try with proper lua
1 parent 640ef8c commit ef21078

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

scenarios/rejection.benchmarks.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ scenarios:
110110
variables:
111111
connections: 32
112112
serverScheme: https
113+
scriptArguments: "{{serverAddress}}:{{serverPort}}"
113114
script: https://raw.githubusercontent.com/aspnet/Benchmarks/main/src/BenchmarksApps/TLS/scripts/invalid-header.lua?raw=true
114115

115116
kestrel-hostheader-mismatch:
Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
-- sends an invalid HTTP header (with space in the name)
2-
request = function() -- before each request https://github.com/wg/wrk/blob/a211dd5a7050b1f9e8a9870b95513060e72ac4a0/SCRIPTING#L42
2+
3+
local host = "localhost"
4+
5+
init = function(args)
6+
if #args > 0 then
7+
host = args[1]
8+
end
9+
end
10+
11+
-- before each request https://github.com/wg/wrk/blob/a211dd5a7050b1f9e8a9870b95513060e72ac4a0/SCRIPTING#L42
12+
request = function()
313
return "GET /hello-world HTTP/1.1\r\n" ..
4-
"Host: " .. args[1] .. "\r\n" ..
14+
"Host: " .. host .. "\r\n" ..
515
"Invalid Header: value\r\n" ..
616
"\r\n"
717
end

0 commit comments

Comments
 (0)