add meaningful name to the example server
this server name will appear at autobahn summary report. if we do not set the server name, it will display ugly `unknown server`.
This commit is contained in:
parent
c38ddf89de
commit
30d4f5ca17
|
@ -2,10 +2,11 @@
|
|||
"outdir": "./reports/servers",
|
||||
"servers": [
|
||||
{
|
||||
"name": "nim-ws example server",
|
||||
"url": "ws://127.0.0.1:8888/ws"
|
||||
}
|
||||
],
|
||||
"cases": ["*"],
|
||||
"exclude-cases": ["6.*", "9.*", "12.*", "13.*"],
|
||||
"exclude-agent-cases": {}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,6 +27,11 @@ proc process(r: RequestFence): Future[HttpResponseRef] {.async.} =
|
|||
|
||||
except WebSocketError as exc:
|
||||
error "WebSocket error:", exception = exc.msg
|
||||
|
||||
let header = HttpTable.init([
|
||||
("Server", "nim-ws example server")
|
||||
])
|
||||
|
||||
discard await request.respond(Http200, "Hello World")
|
||||
else:
|
||||
return dumbResponse()
|
||||
|
|
Loading…
Reference in New Issue