louisabraham/har2requests

large responses

RobertSchultzeAuticon opened this issue · 1 comments

some har can, for large responses, omit the actual response
I have a file containing

          "content": {
            "size": 18060186,
            "mimeType": "application/json",
            "compression": 17226601
          },

While this is tricky to handle, right now it stops the processing with KeyError

__init__.py", line 68, in from_json
    responseText=response["content"]["text"]
KeyError: 'text'

it should either give a better error message saying that this is not supported or it should handle this case gracefully.
In the spec, the field is optional, even if size is > 0
http://www.softwareishard.com/blog/har-12-spec/#content

great module btw :)

I see, we already discussed this in #2 and #4. I'll trigger a warning.