Merge pull request #12 from Microsoft/repeek/FixContentEncodingHeaderBugV2
Fix content-encoding header bug
This commit is contained in:
Коммит
9fc8c9f437
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "harreplayer",
|
||||
"version": "1.1.3",
|
||||
"version": "1.1.4",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "harreplayer",
|
||||
"version": "1.1.3",
|
||||
"version": "1.1.4",
|
||||
"description": "A web server that replays HTTP archive (HAR) files",
|
||||
"main": "index.js",
|
||||
"keywords": [
|
||||
|
|
|
@ -33,7 +33,7 @@ export function start(listenPort: number, listenPortSSL: number, sslKeyLocation:
|
|||
|
||||
for (var i=0; i<harFileEntry.Response.Headers.length; i++) {
|
||||
var header: Header = harFileEntry.Response.Headers[i];
|
||||
if (header.name !== 'Content-Encoding') { //Prevent "ERR_CONTENT_DECODING_FAILED". This happens when setting content-encoding response header.
|
||||
if (header.name.toLowerCase() !== 'content-encoding') { //Prevent "ERR_CONTENT_DECODING_FAILED". This happens when setting content-encoding response header.
|
||||
if (header.name === 'Content-Length')
|
||||
{
|
||||
responseObj.setHeader(header.name, responseBytes.length);
|
||||
|
|
Загрузка…
Ссылка в новой задаче