presidium 3.4.3 → 3.4.5

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.
Files changed (3) hide show
  1. package/HTTP.js +2 -0
  2. package/S3Bucket.js +4 -0
  3. package/package.json +1 -1
package/HTTP.js CHANGED
@@ -134,9 +134,11 @@ class HTTP {
134
134
  resolve(response)
135
135
  })
136
136
 
137
+ /* TODO remove this an closeConnections from codebase (breaking)
137
138
  request.on('socket', socket => {
138
139
  this._sockets.add(socket)
139
140
  })
141
+ */
140
142
 
141
143
  request.on('error', reject)
142
144
  if (
package/S3Bucket.js CHANGED
@@ -849,6 +849,10 @@ class S3Bucket {
849
849
  *
850
850
  */
851
851
  async putObject(key, body, options = {}) {
852
+ if (key.startsWith('/')) {
853
+ throw new Error(`Invalid key ${key}`)
854
+ }
855
+
852
856
  const headers = {}
853
857
 
854
858
  if (options.ACL) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "presidium",
3
- "version": "3.4.3",
3
+ "version": "3.4.5",
4
4
  "description": "A library for creating web services",
5
5
  "author": "Richard Tong",
6
6
  "license": "MIT",