screwdriver-api 8.0.62 → 8.0.63

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": "screwdriver-api",
3
- "version": "8.0.62",
3
+ "version": "8.0.63",
4
4
  "description": "API server for the Screwdriver.cd service",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -72,11 +72,11 @@ const webhooksPlugin = {
72
72
 
73
73
  try {
74
74
  let size = 0;
75
- let data = '';
75
+ const chunks = [];
76
76
 
77
77
  for await (const chunk of request.payload) {
78
78
  size += chunk.length;
79
- data += chunk;
79
+ chunks.push(chunk);
80
80
  if (size > DEFAULT_MAX_BYTES) {
81
81
  throw boom.entityTooLarge(
82
82
  `Payload size exceeds the maximum limit of ${DEFAULT_MAX_BYTES} bytes`
@@ -84,6 +84,7 @@ const webhooksPlugin = {
84
84
  }
85
85
  }
86
86
 
87
+ const data = Buffer.concat(chunks).toString();
87
88
  let parsedPayload;
88
89
 
89
90
  try {