Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decompression failed when trying to use a har that was generated using 'disable cache'. #128

Open
dwjohnston opened this issue May 1, 2023 · 1 comment

Comments

@dwjohnston
Copy link

dwjohnston commented May 1, 2023

I want to generate a HAR file for a request from this endpoint: https://jsonplaceholder.typicode.com/users

Note that the first issue that you'll have is that if you're getting a cached response (status 304), then Mockbin will return an empty response body. Ok, fair enough.

So if we check the disable cache checkbox and generate a har file from that, then when we try to retrieve the response we get a CONTENT_DECODING_FAILED 200 (OK) error.

Relevant part of the har file:

Chrome

{
          "status": 200,
          "statusText": "",
          "httpVersion": "http/2.0",
          "headers": [
            {
              "name": "access-control-allow-credentials",
              "value": "true"
            },
            {
              "name": "age",
              "value": "17234"
            },
            {
              "name": "alt-svc",
              "value": "h3=\":443\"; ma=86400, h3-29=\":443\"; ma=86400"
            },
            {
              "name": "cache-control",
              "value": "max-age=43200"
            },
            {
              "name": "cf-cache-status",
              "value": "HIT"
            },
            {
              "name": "cf-ray",
              "value": "7c067e531b556bfd-SIN"
            },
            {
              "name": "content-encoding",
              "value": "br"
            },
            {
              "name": "content-type",
              "value": "application/json; charset=utf-8"
            },
            {
              "name": "date",
              "value": "Mon, 01 May 2023 08:00:54 GMT"
            },
            {
              "name": "etag",
              "value": "W/\"160d-1eMSsxeJRfnVLRBmYJSbCiJZ1qQ\""
            },
            {
              "name": "expires",
              "value": "-1"
            },
            {
              "name": "nel",
              "value": "{\"success_fraction\":0,\"report_to\":\"cf-nel\",\"max_age\":604800}"
            },
            {
              "name": "pragma",
              "value": "no-cache"
            },
            {
              "name": "report-to",
              "value": "{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s=GD12VkBNRbSdpJXEhKFuKbDI7M%2Bg3aeFOSDfeyMXl7zHTmTpsrKDDJdovHt4WS2kHqisfYTLnlU6snW5bFxo9gQXjTYv5thHz79TPTSJnClgpTdqWuRnJQMiYeduo6JaIDInQrv%2F5QaARmPNPsiY\"}],\"group\":\"cf-nel\",\"max_age\":604800}"
            },
            {
              "name": "server",
              "value": "cloudflare"
            },
            {
              "name": "vary",
              "value": "Origin, Accept-Encoding"
            },
            {
              "name": "via",
              "value": "1.1 vegur"
            },
            {
              "name": "x-content-type-options",
              "value": "nosniff"
            },
            {
              "name": "x-powered-by",
              "value": "Express"
            },
            {
              "name": "x-ratelimit-limit",
              "value": "1000"
            },
            {
              "name": "x-ratelimit-remaining",
              "value": "999"
            },
            {
              "name": "x-ratelimit-reset",
              "value": "1663123245"
            }
          ],
          "cookies": [],
          "content": {
            "size": 5645,
            "mimeType": "application/json",
            "text": "[\n  {\n    \"id\": 1,\n    \"name\": \"Leanne Graham\",\n    \"username\": \"Bret\",\n    \"email\": \"[email protected]\",\n    \"address\": {\n      \"street\": \"Kulas Light\",\n      \"suite\": \"Apt. 556\",\n      \"city\": \"Gwenborough\",\n      \"zipcode\": \"92998-3874\",\n      \"geo\": {\n        \"lat\": \"-37.3159\",\n        \"lng\": \"81.1496\"\n      }\n    },\n    \"phone\": \"1-770-736-8031 x56442\",\n    \"website\": \"hildegard.org\",\n    \"company\": {\n      \"name\": \"Romaguera-Crona\",\n      \"catchPhrase\": \"Multi-layered client-server neural-net\",\n      \"bs\": \"harness real-time e-markets\"\n    }\n  },\n  {\n    \"id\": 2,\n    \"name\": \"Ervin Howell\",\n    \"username\": \"Antonette\",\n    \"email\": \"[email protected]\",\n    \"address\": {\n      \"street\": \"Victor Plains\",\n      \"suite\": \"Suite 879\",\n      \"city\": \"Wisokyburgh\",\n      \"zipcode\": \"90566-7771\",\n      \"geo\": {\n        \"lat\": \"-43.9509\",\n        \"lng\": \"-34.4618\"\n      }\n    },\n    \"phone\": \"010-692-6593 x09125\",\n    \"website\": \"anastasia.net\",\n    \"company\": {\n      \"name\": \"Deckow-Crist\",\n      \"catchPhrase\": \"Proactive didactic contingency\",\n      \"bs\": \"synergize scalable supply-chains\"\n    }\n  },\n  {\n    \"id\": 3,\n    \"name\": \"Clementine Bauch\",\n    \"username\": \"Samantha\",\n    \"email\": \"[email protected]\",\n    \"address\": {\n      \"street\": \"Douglas Extension\",\n      \"suite\": \"Suite 847\",\n      \"city\": \"McKenziehaven\",\n      \"zipcode\": \"59590-4157\",\n      \"geo\": {\n        \"lat\": \"-68.6102\",\n        \"lng\": \"-47.0653\"\n      }\n    },\n    \"phone\": \"1-463-123-4447\",\n    \"website\": \"ramiro.info\",\n    \"company\": {\n      \"name\": \"Romaguera-Jacobson\",\n      \"catchPhrase\": \"Face to face bifurcated interface\",\n      \"bs\": \"e-enable strategic applications\"\n    }\n  },\n  {\n    \"id\": 4,\n    \"name\": \"Patricia Lebsack\",\n    \"username\": \"Karianne\",\n    \"email\": \"[email protected]\",\n    \"address\": {\n      \"street\": \"Hoeger Mall\",\n      \"suite\": \"Apt. 692\",\n      \"city\": \"South Elvis\",\n      \"zipcode\": \"53919-4257\",\n      \"geo\": {\n        \"lat\": \"29.4572\",\n        \"lng\": \"-164.2990\"\n      }\n    },\n    \"phone\": \"493-170-9623 x156\",\n    \"website\": \"kale.biz\",\n    \"company\": {\n      \"name\": \"Robel-Corkery\",\n      \"catchPhrase\": \"Multi-tiered zero tolerance productivity\",\n      \"bs\": \"transition cutting-edge web services\"\n    }\n  },\n  {\n    \"id\": 5,\n    \"name\": \"Chelsey Dietrich\",\n    \"username\": \"Kamren\",\n    \"email\": \"[email protected]\",\n    \"address\": {\n      \"street\": \"Skiles Walks\",\n      \"suite\": \"Suite 351\",\n      \"city\": \"Roscoeview\",\n      \"zipcode\": \"33263\",\n      \"geo\": {\n        \"lat\": \"-31.8129\",\n        \"lng\": \"62.5342\"\n      }\n    },\n    \"phone\": \"(254)954-1289\",\n    \"website\": \"demarco.info\",\n    \"company\": {\n      \"name\": \"Keebler LLC\",\n      \"catchPhrase\": \"User-centric fault-tolerant solution\",\n      \"bs\": \"revolutionize end-to-end systems\"\n    }\n  },\n  {\n    \"id\": 6,\n    \"name\": \"Mrs. Dennis Schulist\",\n    \"username\": \"Leopoldo_Corkery\",\n    \"email\": \"[email protected]\",\n    \"address\": {\n      \"street\": \"Norberto Crossing\",\n      \"suite\": \"Apt. 950\",\n      \"city\": \"South Christy\",\n      \"zipcode\": \"23505-1337\",\n      \"geo\": {\n        \"lat\": \"-71.4197\",\n        \"lng\": \"71.7478\"\n      }\n    },\n    \"phone\": \"1-477-935-8478 x6430\",\n    \"website\": \"ola.org\",\n    \"company\": {\n      \"name\": \"Considine-Lockman\",\n      \"catchPhrase\": \"Synchronised bottom-line interface\",\n      \"bs\": \"e-enable innovative applications\"\n    }\n  },\n  {\n    \"id\": 7,\n    \"name\": \"Kurtis Weissnat\",\n    \"username\": \"Elwyn.Skiles\",\n    \"email\": \"[email protected]\",\n    \"address\": {\n      \"street\": \"Rex Trail\",\n      \"suite\": \"Suite 280\",\n      \"city\": \"Howemouth\",\n      \"zipcode\": \"58804-1099\",\n      \"geo\": {\n        \"lat\": \"24.8918\",\n        \"lng\": \"21.8984\"\n      }\n    },\n    \"phone\": \"210.067.6132\",\n    \"website\": \"elvis.io\",\n    \"company\": {\n      \"name\": \"Johns Group\",\n      \"catchPhrase\": \"Configurable multimedia task-force\",\n      \"bs\": \"generate enterprise e-tailers\"\n    }\n  },\n  {\n    \"id\": 8,\n    \"name\": \"Nicholas Runolfsdottir V\",\n    \"username\": \"Maxime_Nienow\",\n    \"email\": \"[email protected]\",\n    \"address\": {\n      \"street\": \"Ellsworth Summit\",\n      \"suite\": \"Suite 729\",\n      \"city\": \"Aliyaview\",\n      \"zipcode\": \"45169\",\n      \"geo\": {\n        \"lat\": \"-14.3990\",\n        \"lng\": \"-120.7677\"\n      }\n    },\n    \"phone\": \"586.493.6943 x140\",\n    \"website\": \"jacynthe.com\",\n    \"company\": {\n      \"name\": \"Abernathy Group\",\n      \"catchPhrase\": \"Implemented secondary concept\",\n      \"bs\": \"e-enable extensible e-tailers\"\n    }\n  },\n  {\n    \"id\": 9,\n    \"name\": \"Glenna Reichert\",\n    \"username\": \"Delphine\",\n    \"email\": \"[email protected]\",\n    \"address\": {\n      \"street\": \"Dayna Park\",\n      \"suite\": \"Suite 449\",\n      \"city\": \"Bartholomebury\",\n      \"zipcode\": \"76495-3109\",\n      \"geo\": {\n        \"lat\": \"24.6463\",\n        \"lng\": \"-168.8889\"\n      }\n    },\n    \"phone\": \"(775)976-6794 x41206\",\n    \"website\": \"conrad.com\",\n    \"company\": {\n      \"name\": \"Yost and Sons\",\n      \"catchPhrase\": \"Switchable contextually-based project\",\n      \"bs\": \"aggregate real-time technologies\"\n    }\n  },\n  {\n    \"id\": 10,\n    \"name\": \"Clementina DuBuque\",\n    \"username\": \"Moriah.Stanton\",\n    \"email\": \"[email protected]\",\n    \"address\": {\n      \"street\": \"Kattie Turnpike\",\n      \"suite\": \"Suite 198\",\n      \"city\": \"Lebsackbury\",\n      \"zipcode\": \"31428-2261\",\n      \"geo\": {\n        \"lat\": \"-38.2386\",\n        \"lng\": \"57.2232\"\n      }\n    },\n    \"phone\": \"024-648-3804\",\n    \"website\": \"ambrose.net\",\n    \"company\": {\n      \"name\": \"Hoeger LLC\",\n      \"catchPhrase\": \"Centralized empowering task-force\",\n      \"bs\": \"target end-to-end models\"\n    }\n  }\n]"
          },
          "redirectURL": "",
          "headersSize": -1,
          "bodySize": -1,
          "_transferSize": 2176,
          "_error": null
        }

Firefox

{
          "status": 200,
          "statusText": "OK",
          "httpVersion": "HTTP/2",
          "headers": [
            {
              "name": "date",
              "value": "Mon, 01 May 2023 07:54:14 GMT"
            },
            {
              "name": "content-type",
              "value": "application/json; charset=utf-8"
            },
            {
              "name": "x-powered-by",
              "value": "Express"
            },
            {
              "name": "x-ratelimit-limit",
              "value": "1000"
            },
            {
              "name": "x-ratelimit-remaining",
              "value": "999"
            },
            {
              "name": "x-ratelimit-reset",
              "value": "1674041833"
            },
            {
              "name": "vary",
              "value": "Origin, Accept-Encoding"
            },
            {
              "name": "access-control-allow-credentials",
              "value": "true"
            },
            {
              "name": "cache-control",
              "value": "max-age=43200"
            },
            {
              "name": "pragma",
              "value": "no-cache"
            },
            {
              "name": "expires",
              "value": "-1"
            },
            {
              "name": "x-content-type-options",
              "value": "nosniff"
            },
            {
              "name": "etag",
              "value": "W/\"160d-1eMSsxeJRfnVLRBmYJSbCiJZ1qQ\""
            },
            {
              "name": "via",
              "value": "1.1 vegur"
            },
            {
              "name": "cf-cache-status",
              "value": "HIT"
            },
            {
              "name": "age",
              "value": "1485"
            },
            {
              "name": "report-to",
              "value": "{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s=Si%2BgrqWZVE50F2ftYpJv5FEUOuiCsB04ULfmiPknIWTuF2ImeA8A07at%2BlgSo56HfIjYwu6j732FM5xVrmRjw%2F0pkfcx3zu6AwSzAvwMpAb0c4cqKHRtVSjbF7PbBTpD4XGnCNzZCp1L9sDp02tz\"}],\"group\":\"cf-nel\",\"max_age\":604800}"
            },
            {
              "name": "nel",
              "value": "{\"success_fraction\":0,\"report_to\":\"cf-nel\",\"max_age\":604800}"
            },
            {
              "name": "server",
              "value": "cloudflare"
            },
            {
              "name": "cf-ray",
              "value": "7c067493588fa3ef-SIN"
            },
            {
              "name": "content-encoding",
              "value": "br"
            },
            {
              "name": "alt-svc",
              "value": "h3=\":443\"; ma=86400, h3-29=\":443\"; ma=86400"
            },
            {
              "name": "X-Firefox-Spdy",
              "value": "h2"
            }
          ],
          "cookies": [],
          "content": {
            "mimeType": "application/vnd.mozilla.json.view; charset=utf-8",
            "size": 5645,
            "encoding": "base64",
            "text": "WwogIHsKICAgICJpZCI6IDEsCiAgICAibmFtZSI6ICJMZWFubmUgR3JhaGFtIiwKICAgICJ1c2VybmFtZSI6ICJCcmV0IiwKICAgICJlbWFpbCI6ICJTaW5jZXJlQGFwcmlsLmJpeiIsCiAgICAiYWRkcmVzcyI6IHsKICAgICAgInN0cmVldCI6ICJLdWxhcyBMaWdodCIsCiAgICAgICJzdWl0ZSI6ICJBcHQuIDU1NiIsCiAgICAgICJjaXR5IjogIkd3ZW5ib3JvdWdoIiwKICAgICAgInppcGNvZGUiOiAiOTI5OTgtMzg3NCIsCiAgICAgICJnZW8iOiB7CiAgICAgICAgImxhdCI6ICItMzcuMzE1OSIsCiAgICAgICAgImxuZyI6ICI4MS4xNDk2IgogICAgICB9CiAgICB9LAogICAgInBob25lIjogIjEtNzcwLTczNi04MDMxIHg1NjQ0MiIsCiAgICAid2Vic2l0ZSI6ICJoaWxkZWdhcmQub3JnIiwKICAgICJjb21wYW55IjogewogICAgICAibmFtZSI6ICJSb21hZ3VlcmEtQ3JvbmEiLAogICAgICAiY2F0Y2hQaHJhc2UiOiAiTXVsdGktbGF5ZXJlZCBjbGllbnQtc2VydmVyIG5ldXJhbC1uZXQiLAogICAgICAiYnMiOiAiaGFybmVzcyByZWFsLXRpbWUgZS1tYXJrZXRzIgogICAgfQogIH0sCiAgewogICAgImlkIjogMiwKICAgICJuYW1lIjogIkVydmluIEhvd2VsbCIsCiAgICAidXNlcm5hbWUiOiAiQW50b25ldHRlIiwKICAgICJlbWFpbCI6ICJTaGFubmFAbWVsaXNzYS50diIsCiAgICAiYWRkcmVzcyI6IHsKICAgICAgInN0cmVldCI6ICJWaWN0b3IgUGxhaW5zIiwKICAgICAgInN1aXRlIjogIlN1aXRlIDg3OSIsCiAgICAgICJjaXR5IjogIldpc29reWJ1cmdoIiwKICAgICAgInppcGNvZGUiOiAiOTA1NjYtNzc3MSIsCiAgICAgICJnZW8iOiB7CiAgICAgICAgImxhdCI6ICItNDMuOTUwOSIsCiAgICAgICAgImxuZyI6ICItMzQuNDYxOCIKICAgICAgfQogICAgfSwKICAgICJwaG9uZSI6ICIwMTAtNjkyLTY1OTMgeDA5MTI1IiwKICAgICJ3ZWJzaXRlIjogImFuYXN0YXNpYS5uZXQiLAogICAgImNvbXBhbnkiOiB7CiAg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ogewogICAgICAic3RyZWV0IjogIkhvZWdlciBNYWxsIiwKICAgICAgInN1aXRlIjogIkFwdC4gNjkyIiwKICAgICAgImNpdHkiOiAiU291dGggRWx2aXMiLAogICAgICAiemlwY29kZSI6ICI1MzkxOS00MjU3IiwKICAgICAgImdlbyI6IHsKICAgICAgICAibGF0IjogIjI5LjQ1NzIiLAogICAgICAgICJsbmciOiAiLTE2NC4yOTkwIgogICAgICB9CiAgICB9LAogICAgInBob25lIjogIjQ5My0xNzAtOTYyMyB4MTU2IiwKICAgICJ3ZWJzaXRlIjogImthbGUuYml6IiwKICAgICJjb21wYW55IjogewogICAgICAibmFtZSI6ICJSb2JlbC1Db3JrZXJ5IiwKICAgICAgImNhdGNoUGhyYXNlIjogIk11bHRpLXRpZXJlZCB6ZXJvIHRvbGVyYW5jZSBwcm9kdWN0aXZpdHkiLAogICAgICAiYnMiOiAidHJhbnNpdGlvbiBjdXR0aW5nLWVkZ2Ugd2ViIHNlcnZpY2VzIgogICAgfQogIH0sCiAgewogICAgImlkIjogNSwKICAgICJuYW1lIjogIkNoZWxzZXkgRGlldHJpY2giLAogICAgInVzZXJuYW1lIjogIkthbXJlbiIsCiAgICAiZW1haWwiOiAiTHVjaW9fSGV0dGluZ2VyQGFubmllLmNhIiwKICAgICJhZGRyZXNzIjogewogICAgICAic3RyZWV0IjogIlNraWxlcyBXYWxrcyIsCiAgICAgICJzdWl0ZSI6ICJTdWl0ZSAzNTEiLAogICAgICAiY2l0eSI6ICJSb3Njb2V2aWV3IiwKICAgICAgInppcGNvZGUiOiAiMzMyNjMiLAogICAgICAiZ2VvIjogewogICAgICAgICJsYXQiOiAiLTMxLjgxMjkiLAogICAgICAgICJsbmciOiAiNjIuNTM0MiIKICAgICAgfQogICAgfSwKICAgICJwaG9uZSI6ICIoMjU0KTk1NC0xMjg5IiwKICAgICJ3ZWJzaXRlIjogImRlbWFyY28uaW5mbyIsCiAgICAiY29tcGFueSI6IHsKICAgICAgIm5hbWUiOiAiS2VlY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VzcyI6IHsKICAgICAgInN0cmVldCI6ICJSZXggVHJhaWwiLAogICAgICAic3VpdGUiOiAiU3VpdGUgMjgwIiwKICAgICAgImNpdHkiOiAiSG93ZW1vdXRoIiwKICAgICAgInppcGNvZGUiOiAiNTg4MDQtMTA5OSIsCiAgICAgICJnZW8iOiB7CiAgICAgICAgImxhdCI6ICIyNC44OTE4IiwKICAgICAgICAibG5nIjogIjIxLjg5ODQiCiAgICAgIH0KICAgIH0sCiAgICAicGhvbmUiOiAiMjEwLjA2Ny42MTMyIiwKICAgICJ3ZWJzaXRlIjogImVsdmlzLmlvIiwKICAgICJjb21wYW55IjogewogICAgICAibmFtZSI6ICJKb2hucyBHcm91cCIsCiAgICAgICJjYXRjaFBocmFzZSI6ICJDb25maWd1cmFibGUgbXVsdGltZWRpYSB0YXNrLWZvcmNlIiwKICAgICAgImJzIjogImdlbmVyYXRlIGVudGVycHJpc2UgZS10YWlsZXJzIgogICAgfQogIH0sCiAgewogICAgImlkIjogOCwKICAgICJuYW1lIjogIk5pY2hvbGFzIFJ1bm9sZnNkb3R0aXIgViIsCiAgICAidXNlcm5hbWUiOiAiTWF4aW1lX05pZW5vdyIsCiAgICAiZW1haWwiOiAiU2hlcndvb2RAcm9zYW1vbmQubWUiLAogICAgImFkZHJlc3MiOiB7CiAgICAgICJzdHJlZXQiOiAiRWxsc3dvcnRoIFN1bW1pdCIsCiAgICAgICJzdWl0ZSI6ICJTdWl0ZSA3MjkiLAogICAgICAiY2l0eSI6ICJBbGl5YXZpZXciLAogICAgICAiemlwY29kZSI6ICI0NTE2OSIsCiAgICAgICJnZW8iOiB7CiAgICAgICAgImxhdCI6ICItMTQuMzk5MCIsCiAgICAgICAgImxuZyI6ICItMTIwLjc2NzciCiAgICAgIH0KICAgIH0sCiAgICAicGhvbmUiOiAiNTg2LjQ5My42OTQzIHgxNDAiLAogICAgIndlYnNpdGUiOiAiamFjeW50aGUuY29tIiwKICAgICJjb21wYW55IjogewogICAgICAibmFtZSI6IC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AgICJhZGRyZXNzIjogewogICAgICAic3RyZWV0IjogIkthdHRpZSBUdXJucGlrZSIsCiAgICAgICJzdWl0ZSI6ICJTdWl0ZSAxOTgiLAogICAgICAiY2l0eSI6ICJMZWJzYWNrYnVyeSIsCiAgICAgICJ6aXBjb2RlIjogIjMxNDI4LTIyNjEiLAogICAgICAiZ2VvIjogewogICAgICAgICJsYXQiOiAiLTM4LjIzODYiLAogICAgICAgICJsbmciOiAiNTcuMjIzMiIKICAgICAgfQogICAgfSwKICAgICJwaG9uZSI6ICIwMjQtNjQ4LTM4MDQiLAogICAgIndlYnNpdGUiOiAiYW1icm9zZS5uZXQiLAogICAgImNvbXBhbnkiOiB7CiAgICAgICJuYW1lIjogIkhvZWdlciBMTEMiLAogICAgICAiY2F0Y2hQaHJhc2UiOiAiQ2VudHJhbGl6ZWQgZW1wb3dlcmluZyB0YXNrLWZvcmNlIiwKICAgICAgImJzIjogInRhcmdldCBlbmQtdG8tZW5kIG1vZGVscyIKICAgIH0KICB9Cl0="
          },
          "redirectURL": "",
          "headersSize": 951,
          "bodySize": 2811
        }

Note that Chrome and Firefox appear to behave differently with respect to the body size property, but the har generated from both has the same issue.

@dwjohnston dwjohnston changed the title Decompression failed when trying to use a har that was generated using 'preserve cache'. Decompression failed when trying to use a har that was generated using 'disable cache'. Aug 12, 2023
@dwjohnston
Copy link
Author

Note that if we remove all the headers and set headersSize to 0, it'll work - so I suspect that one of these headers is not playing nicely with Mockbin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant