@superhero/http-server 4.3.9 → 4.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -25,7 +25,7 @@ export default class StatusDispatcher
25
25
  session.view.body.started = this.started_json
26
26
 
27
27
  // Statistics
28
- if(request.query.stats)
28
+ if(request.url.query.stats)
29
29
  {
30
30
  session.view.body.dispatched = String(this.server.dispatched)
31
31
  session.view.body.completed = String(this.server.completed)
@@ -34,13 +34,13 @@ export default class StatusDispatcher
34
34
  }
35
35
 
36
36
  // Uptime
37
- if(request.query.uptime)
37
+ if(request.url.query.uptime)
38
38
  {
39
39
  session.view.body.uptime = String(this.started.getTime() - new Date().getTime())
40
40
  }
41
41
 
42
42
  // CPU usage
43
- if(request.query.cpu)
43
+ if(request.url.query.cpu)
44
44
  {
45
45
  session.view.body.cpu = os.cpus().map((cpu) =>
46
46
  {
@@ -53,7 +53,7 @@ export default class StatusDispatcher
53
53
  }
54
54
 
55
55
  // RAM usage
56
- if(request.query.ram)
56
+ if(request.url.query.ram)
57
57
  {
58
58
  const
59
59
  total = os.totalmem(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superhero/http-server",
3
- "version": "4.3.9",
3
+ "version": "4.4.0",
4
4
  "description": "HTTP(S) server component supporting both HTTP 1.1 and HTTP 2.0",
5
5
  "keywords": [
6
6
  "http server",