Upgrade curl to test HTTP2
reorx opened this issue · 1 comments
reorx commented
Current version:
$ curl --version
curl 7.43.0 (x86_64-apple-darwin15.0) libcurl/7.43.0 SecureTransport zlib/1.2.5
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz UnixSockets
Upgrade using brew install --build-from-source curl --with-nghttp2
(hint from https://simonecarletti.com/blog/2016/01/http2-curl-macosx/)
Testing process will be logged here.
reorx commented
Achieve the ability to indicate curl bin path in PR #13.
Set curl bin by:
export HTTPSTAT_CURL_BIN=/usr/local/Cellar/curl/7.50.3/bin/curl
Request https://http2.akamai.com/ with curl option --http2
$ python httpstat.py https://http2.akamai.com/ --http2
DEBUG:httpstat:ENVs:
HTTPSTAT_SHOW_BODY: False
HTTPSTAT_SHOW_SPEED: False
HTTPSTAT_CURL_BIN: /usr/local/Cellar/curl/7.50.3/bin/curl
HTTPSTAT_DEBUG: True
DEBUG:httpstat:cmd: ['/usr/local/Cellar/curl/7.50.3/bin/curl', '-w', '{\n"time_namelookup": %{time_namelookup},\n"time_connect": %{time_connect},\n"time_appconnect": %{time_appconnect},\n"time_pretransfer": %{time_pretransfer},\n"time_redirect": %{time_redirect},\n"time_starttransfer": %{time_starttransfer},\n"time_total": %{time_total},\n"speed_download": %{speed_download},\n"speed_upload": %{speed_upload}\n}', '-D', '/var/folders/82/sfpvl4pd3vd4_4hy0dqcvldr0000gn/T/tmpZBoEIw', '-o', '/var/folders/82/sfpvl4pd3vd4_4hy0dqcvldr0000gn/T/tmpLgR7O9', '-s', '-S', '--http2', 'https://http2.akamai.com/']
HTTP/2 200
server: Apache
content-type: text/html;charset=UTF-8
etag: "5e9139516a4f3d7a27577441623ca90d:1465962509"
link: <https://ds-aksb-a.akamaihd.net>;rel="preconnect"
link: <https://www.youtube.com>;rel="preconnect"
strict-transport-security: max-age=31536000 ; includeSubDomains
access-control-allow-origin: *
access-control-allow-methods: GET,HEAD,POST
access-control-allow-headers: *
access-control-allow-credentials: false
access-control-max-age: 86400
accept-ch: DPR, Width, Viewport-Width, Downlink, Save-Data
protocol_negotiation: h2
myproto: h2
client_ip: 119.9.108.90
client_real_ip: 119.9.108.90
ghost_service_ip: 184.28.218.196
ghost_ip: 23.196.42.197
rtt: 4
push: true
x-akamai-transformed: 9 10583 0 pmb=mRUM,1
cache-control: max-age=43200
expires: Tue, 27 Sep 2016 19:23:27 GMT
date: Tue, 27 Sep 2016 07:23:27 GMT
content-length: 11692
Body stored in: /var/folders/82/sfpvl4pd3vd4_4hy0dqcvldr0000gn/T/tmpLgR7O9
DNS Lookup TCP Connection SSL Handshake Server Processing Content Transfer
[ 478ms | 4ms | 77ms | 635ms | 0ms ]
| | | | |
namelookup:478ms | | | |
connect:482ms | | |
pretransfer:559ms | |
starttransfer:1194ms |
total:1194ms