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

Added logic to skip firstLine response header if HTTP 2.0 #2

Merged
merged 1 commit into from
Sep 27, 2017

Conversation

rtabor
Copy link
Contributor

@rtabor rtabor commented Sep 27, 2017

This PR is an attempt to support HTTP/1.1 and HTTP/2.0 requests.

The HTTP 1.1 version of the response header begins with the format <HTTP Version><response code><status> (Ex. 'HTTP/1.1 200 OK' ).
When exporting a Charles JSON Session File this first line is stored under the firstLine key. The script is explicitly searching for the firstLine key when doing its processing of the Charles JSON Session File.
I noticed that HTTP 2.0 response headers do not begin with this line so the script returns a KeyError when trying to process a Charles JSON Session File that has HTTP 2.0 requests.
I added a try/except block to skip this processing if the firstLine key does not exist

@ambertests ambertests merged commit 08bd36c into ambertests:master Sep 27, 2017
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

Successfully merging this pull request may close these issues.

2 participants