Skip to content

Instantly share code, notes, and snippets.

@jasonish
Last active August 3, 2020 18:13
Show Gist options
  • Select an option

  • Save jasonish/16fb15c0eabc34059bdf6bbec34aeb88 to your computer and use it in GitHub Desktop.

Select an option

Save jasonish/16fb15c0eabc34059bdf6bbec34aeb88 to your computer and use it in GitHub Desktop.
{
"timestamp": "2018-08-12T17:30:42.294261+0000",
"flow_id": 257051355878948,
"pcap_cnt": 3,
"event_type": "http",
"src_ip": "10.9.0.2",
"src_port": 58038,
"dest_ip": "139.162.123.134",
"dest_port": 80,
"proto": "TCP",
"tx_id": 0,
"http": {
"hostname": "nghttp2.org",
"url": "/robots.txt",
"http_user_agent": "curl/7.61.0",
"http_method": "GET",
"protocol": "HTTP/1.1",
"status": 101,
"length": 0,
"request_headers": [
{
"name": "Host",
"value": "nghttp2.org"
},
{
"name": "User-Agent",
"value": "curl/7.61.0"
},
{
"name": "Accept",
"value": "*/*"
},
{
"name": "Connection",
"value": "Upgrade, HTTP2-Settings"
},
{
"name": "Upgrade",
"value": "h2c"
},
{
"name": "HTTP2-Settings",
"value": "AAMAAABkAARAAAAAAAIAAAAA"
}
],
"response_headers": [
{
"name": "Connection",
"value": "Upgrade"
},
{
"name": "Upgrade",
"value": "h2c"
}
]
}
}
{
"timestamp": "2018-08-12T17:30:42.295103+0000",
"flow_id": 257051355878948,
"pcap_cnt": 8,
"event_type": "http2",
"src_ip": "10.9.0.2",
"src_port": 58038,
"dest_ip": "139.162.123.134",
"dest_port": 80,
"proto": "TCP",
"tx_id": 1,
"http2": {
"stream_id": 1,
"request": {
"headers": [
{
"name": ":method",
"value": "GET"
},
{
"name": ":path",
"value": "/robots.txt"
},
{
"name": "Host",
"value": "nghttp2.org"
},
{
"name": "User-Agent",
"value": "curl/7.61.0"
},
{
"name": "Accept",
"value": "*/*"
},
{
"name": "Connection",
"value": "Upgrade, HTTP2-Settings"
},
{
"name": "Upgrade",
"value": "h2c"
}
]
},
"response": {
"headers": [
{
"name": ":status",
"value": "200"
},
{
"name": "date",
"value": "Sun, 12 Aug 2018 17:30:41 GMT"
},
{
"name": "content-type",
"value": "text/plain"
},
{
"name": "last-modified",
"value": "Tue, 08 May 2018 13:53:22 GMT"
},
{
"name": "etag",
"value": "\"5af1abd2-3e\""
},
{
"name": "accept-ranges",
"value": "bytes"
},
{
"name": "content-length",
"value": "62"
},
{
"name": "x-backend-header-rtt",
"value": "0.002645"
},
{
"name": "server",
"value": "nghttpx"
},
{
"name": "via",
"value": "2 nghttpx"
},
{
"name": "x-frame-options",
"value": "SAMEORIGIN"
},
{
"name": "x-xss-protection",
"value": "1; mode=block"
},
{
"name": "x-content-type-options",
"value": "nosniff"
}
]
}
}
}
{
"timestamp": "2018-08-12T17:30:42.295103+0000",
"flow_id": 257051355878948,
"pcap_cnt": 8,
"event_type": "http",
"src_ip": "10.9.0.2",
"src_port": 58038,
"dest_ip": "139.162.123.134",
"dest_port": 80,
"proto": "TCP",
"tx_id": 1,
"http": {
"hostname": "nghttp2.org",
"url": "/robots.txt",
"http_user_agent": "curl/7.61.0",
"http_method": "GET",
"protocol": "HTTP/2",
"status": 200,
"length": 62,
"version": "2",
"request_headers": [
{
"name": ":method",
"value": "GET"
},
{
"name": ":path",
"value": "/robots.txt"
},
{
"name": "Host",
"value": "nghttp2.org"
},
{
"name": "User-Agent",
"value": "curl/7.61.0"
},
{
"name": "Accept",
"value": "*/*"
},
{
"name": "Connection",
"value": "Upgrade, HTTP2-Settings"
},
{
"name": "Upgrade",
"value": "h2c"
}
],
"response_headers": [
{
"name": ":status",
"value": "200"
},
{
"name": "date",
"value": "Sun, 12 Aug 2018 17:30:41 GMT"
},
{
"name": "content-type",
"value": "text/plain"
},
{
"name": "last-modified",
"value": "Tue, 08 May 2018 13:53:22 GMT"
},
{
"name": "etag",
"value": "\"5af1abd2-3e\""
},
{
"name": "accept-ranges",
"value": "bytes"
},
{
"name": "content-length",
"value": "62"
},
{
"name": "x-backend-header-rtt",
"value": "0.002645"
},
{
"name": "server",
"value": "nghttpx"
},
{
"name": "via",
"value": "2 nghttpx"
},
{
"name": "x-frame-options",
"value": "SAMEORIGIN"
},
{
"name": "x-xss-protection",
"value": "1; mode=block"
},
{
"name": "x-content-type-options",
"value": "nosniff"
}
],
"http2": {
"stream_id": 1,
"request_settings": [],
"response_settings": [],
}
}
}
@jasonish
Copy link
Author

jasonish commented Aug 3, 2020

Modifications inside the http object that would be nice to make but would break things are:

  • http_user_agent -> user_agent
  • http_method -> method
    Basically drop the stutter on http inside the http object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment