0

browsermob-proxy とその har エクスポート機能に問題があります。一部の応答本文がログに記録されません (「テキスト」フィールド全体が欠落しています)

私のセットアップ (browsermob-proxy 2.1.4 を使用)

curl -X POST http://localhost:8080/proxy?port=9091

curl -X PUT "http://localhost:8080/proxy/9091/har?captureHeaders=true&captureCookies=true&captureContent=true"

いくつかの応答は問題ありません:

"response": { "status": 201, "statusText": "Created", "httpVersion": "HTTP/1.1", "cookies": [], "headers": [{ "name": "Cache-Control", "value": "max-age=0, no-cache, no-store" }, { "name": "Content-Type", "value": "application/json" }, { "name": "Date", "value": "Thu, 15 Feb 2018 13:07:39 GMT" }, { "name": "Location", "value": ... }, { "name": "Pragma", "value": "no-cache" }, { "name": "Render-Time", "value": "8" }, { "name": "Server", "value": "openresty" }, { "name": "Strict-Transport-Security", "value": "max-age=31536000; includeSubDomains" }, { "name": "transfer-encoding", "value": "chunked" }, { "name": "Connection", "value": "keep-alive" }], "content": { "size": 8607, "mimeType": "application/json", "text": "{ <actual json body> }", "comment": "" }, ...

しかし、そうでないものもあります (おそらく、それは特別なコンテンツ/MIME タイプですか? それとも、gzip コンテンツ エンコーディングですか?)

"response": { "status": 200, "statusText": "OK", "httpVersion": "HTTP/1.1", "cookies": [], "headers": [{ "name": "Cache-Control", "value": "max-age=0, no-cache, no-store" }, { "name": "Content-Encoding", "value": "gzip" }, { "name": "Content-Type", "value": "application/some.custom.type-v1+json" }, { "name": "Date", "value": "Thu, 15 Feb 2018 13:07:39 GMT" }, { "name": "Pragma", "value": "no-cache" }, { "name": "Render-Time", "value": "92" }, { "name": "Server", "value": "openresty" }, { "name": "Strict-Transport-Security", "value": "max-age=31536000; includeSubDomains" }, { "name": "Vary", "value": "Accept-Encoding" }, { "name": "Content-Length", "value": "1978" }, { "name": "Connection", "value": "keep-alive" }], "content": { "size": 7429, "mimeType": "application/some.custom.type-v1+json", "comment": "" < there's nothing else here!! > }, "redirectURL": "", "headersSize": 444, "bodySize": 1978, "comment": "" }, ...

そうそう、どちらのリクエストも https 経由であり、MITM を使用しています。

4

1 に答える 1