pixl-server-web 1.3.28 → 1.3.29

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/README.md CHANGED
@@ -1224,8 +1224,9 @@ The raw request and response content will only be logged in certain cases:
1224
1224
  - If the request was a form post, then the key/value pairs will be in the `params` object.
1225
1225
  - If the request contained file uploads, they will be summarized in the `files` object (see above for example).
1226
1226
  - If the response is recognized as text, it will be included in `response.raw` as a UTF-8 string.
1227
- - If the response is non-text (binary), the raw content will not be included.
1228
- - If the response is a stream, it will not be included.
1227
+ - If the response is non-text (binary), the raw content will not be logged.
1228
+ - If the response is pre-compressed by application code, it will not be logged.
1229
+ - If the response is a stream, it will not be logged.
1229
1230
 
1230
1231
  ## Performance Threshold Logging
1231
1232
 
package/lib/response.js CHANGED
@@ -104,7 +104,7 @@ module.exports = class Response {
104
104
 
105
105
  // copy stuff into args for detail logging
106
106
  if (this.logRequestDetails) {
107
- args.resp_body = body;
107
+ if (headers['Content-Encoding']) args.resp_body = Buffer.from("(Compressed)"); else args.resp_body = body;
108
108
  args.resp_headers = headers;
109
109
  }
110
110
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixl-server-web",
3
- "version": "1.3.28",
3
+ "version": "1.3.29",
4
4
  "description": "A web server component for the pixl-server framework.",
5
5
  "author": "Joseph Huckaby <jhuckaby@gmail.com>",
6
6
  "homepage": "https://github.com/jhuckaby/pixl-server-web",