@jsenv/server 15.2.7 → 15.2.9

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/server",
3
- "version": "15.2.7",
3
+ "version": "15.2.9",
4
4
  "description": "Write your Node.js server using pure functions",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -36,7 +36,7 @@
36
36
  "dependencies": {
37
37
  "@jsenv/abort": "4.3.0",
38
38
  "@jsenv/humanize": "1.1.3",
39
- "@jsenv/url-meta": "8.4.1",
39
+ "@jsenv/url-meta": "8.4.2",
40
40
  "@jsenv/utils": "2.1.1",
41
41
  "ws": "8.17.1"
42
42
  },
@@ -1,6 +1,6 @@
1
1
  export const normalizeHeaderName = (headerName) => {
2
2
  headerName = String(headerName);
3
- if (/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(headerName)) {
3
+ if (/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(headerName)) {
4
4
  throw new TypeError("Invalid character in header field name");
5
5
  }
6
6
 
@@ -59,7 +59,7 @@ export const stringifyServerTimingHeader = (serverTimingHeader) => {
59
59
  // https://www.w3.org/TR/2019/WD-server-timing-20190307/#the-server-timing-header-field
60
60
  // https://tools.ietf.org/html/rfc7230#section-3.2.6
61
61
  const validateServerTimingName = (name) => {
62
- const valid = /^[!#$%&'*+\-.^_`|~0-9a-z]+$/gi.test(name);
62
+ const valid = /^[!#$%&'*+\-.^_`|~0-9a-z]+$/i.test(name);
63
63
  if (!valid) {
64
64
  console.warn(`server timing contains invalid symbols`);
65
65
  return false;