Skip to content

Commit

Permalink
Fixed httpVersion field for responses
Browse files Browse the repository at this point in the history
previously, only fixed for requests.
  • Loading branch information
Andrew Fleenor committed Oct 25, 2013
1 parent b3f6e67 commit b13c49e
Show file tree
Hide file tree
Showing 10 changed files with 420 additions and 420 deletions.
2 changes: 1 addition & 1 deletion pcap2har/har.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def HTTPResponseJsonRepr(self):
return {
'status': int(self.msg.status),
'statusText': self.msg.reason,
'httpVersion': self.msg.version,
'httpVersion': 'HTTP/' + self.msg.version,
'cookies': [],
'headersSize': -1,
'bodySize': self.raw_body_length,
Expand Down
18 changes: 9 additions & 9 deletions tests/fhs.pcap.dropped.har
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
}
],
"headersSize": -1,
"httpVersion": "1.1",
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
Expand Down Expand Up @@ -229,7 +229,7 @@
}
],
"headersSize": -1,
"httpVersion": "1.1",
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
Expand Down Expand Up @@ -349,7 +349,7 @@
}
],
"headersSize": -1,
"httpVersion": "1.1",
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
Expand Down Expand Up @@ -469,7 +469,7 @@
}
],
"headersSize": -1,
"httpVersion": "1.1",
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
Expand Down Expand Up @@ -589,7 +589,7 @@
}
],
"headersSize": -1,
"httpVersion": "1.1",
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
Expand Down Expand Up @@ -709,7 +709,7 @@
}
],
"headersSize": -1,
"httpVersion": "1.1",
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
Expand Down Expand Up @@ -829,7 +829,7 @@
}
],
"headersSize": -1,
"httpVersion": "1.1",
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
Expand Down Expand Up @@ -949,7 +949,7 @@
}
],
"headersSize": -1,
"httpVersion": "1.1",
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
Expand Down Expand Up @@ -1069,7 +1069,7 @@
}
],
"headersSize": -1,
"httpVersion": "1.1",
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
Expand Down
18 changes: 9 additions & 9 deletions tests/fhs.pcap.har
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
}
],
"headersSize": -1,
"httpVersion": "1.1",
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
Expand Down Expand Up @@ -233,7 +233,7 @@
}
],
"headersSize": -1,
"httpVersion": "1.1",
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
Expand Down Expand Up @@ -355,7 +355,7 @@
}
],
"headersSize": -1,
"httpVersion": "1.1",
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
Expand Down Expand Up @@ -478,7 +478,7 @@
}
],
"headersSize": -1,
"httpVersion": "1.1",
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
Expand Down Expand Up @@ -601,7 +601,7 @@
}
],
"headersSize": -1,
"httpVersion": "1.1",
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
Expand Down Expand Up @@ -724,7 +724,7 @@
}
],
"headersSize": -1,
"httpVersion": "1.1",
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
Expand Down Expand Up @@ -847,7 +847,7 @@
}
],
"headersSize": -1,
"httpVersion": "1.1",
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
Expand Down Expand Up @@ -970,7 +970,7 @@
}
],
"headersSize": -1,
"httpVersion": "1.1",
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
Expand Down Expand Up @@ -1093,7 +1093,7 @@
}
],
"headersSize": -1,
"httpVersion": "1.1",
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
Expand Down
18 changes: 9 additions & 9 deletions tests/fhs_ncomp.pcap.har
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
}
],
"headersSize": -1,
"httpVersion": "1.1",
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
Expand Down Expand Up @@ -225,7 +225,7 @@
}
],
"headersSize": -1,
"httpVersion": "1.1",
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
Expand Down Expand Up @@ -343,7 +343,7 @@
}
],
"headersSize": -1,
"httpVersion": "1.1",
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
Expand Down Expand Up @@ -462,7 +462,7 @@
}
],
"headersSize": -1,
"httpVersion": "1.1",
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
Expand Down Expand Up @@ -581,7 +581,7 @@
}
],
"headersSize": -1,
"httpVersion": "1.1",
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
Expand Down Expand Up @@ -700,7 +700,7 @@
}
],
"headersSize": -1,
"httpVersion": "1.1",
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
Expand Down Expand Up @@ -819,7 +819,7 @@
}
],
"headersSize": -1,
"httpVersion": "1.1",
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
Expand Down Expand Up @@ -938,7 +938,7 @@
}
],
"headersSize": -1,
"httpVersion": "1.1",
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
Expand Down Expand Up @@ -1057,7 +1057,7 @@
}
],
"headersSize": -1,
"httpVersion": "1.1",
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
Expand Down
4 changes: 2 additions & 2 deletions tests/github.pcap.har
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
}
],
"headersSize": -1,
"httpVersion": "1.1",
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
Expand Down Expand Up @@ -254,7 +254,7 @@
}
],
"headersSize": -1,
"httpVersion": "1.1",
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
Expand Down
4 changes: 2 additions & 2 deletions tests/http.pcap.har
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
}
],
"headersSize": -1,
"httpVersion": "1.1",
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
Expand Down Expand Up @@ -258,7 +258,7 @@
}
],
"headersSize": -1,
"httpVersion": "1.1",
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
Expand Down
2 changes: 1 addition & 1 deletion tests/missing_response.pcap.har
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
}
],
"headersSize": -1,
"httpVersion": "1.1",
"httpVersion": "HTTP/1.1",
"redirectURL": "",
"status": 200,
"statusText": "OK"
Expand Down
Loading

0 comments on commit b13c49e

Please sign in to comment.