Does VuGen support recording and replay of HTTP/2 enabled web sites? How is HTTP/2 enabled?

  • KM02382110
  • 03-Jun-2016
  • 03-Jun-2016

Summary

As of version 12.53 VuGen supports HTTP/2 enabled web sites for recording and replay, including multiplexing.

Question

Does VuGen support recording and replay of HTTP/2 enabled web sites? If yes, how is HTTP/2 enabled?

Answer

As of version 12.53 VuGen supports HTTP/2 (including multiplexing) enabled web sites for recording and replay.

In order to enable recording of HTTP/2 the following recording option must be set:

  1. Record > Recording Options > Network > Mapping and Filtering.
  2. Click Options to open the Advanced Port Mapping Settings dialog box
  3. In the SSL Version dropdown, select TLS ALPN.
  4. Click Update.

image text

ALPN is a Transport Layer Security extension for application layer protocol negotiation within the TLS handshake. It allows the application layer to negotiate which protocol should be performed over a secure connection in a manner which avoids additional round trips and which is independent of the application layer protocols.

In order to enable replaying of HTTP/2, make sure the correct TLS version is set in the script:

web_set_sockets_option('SSL_VERSION', 'TLS1.2');

To verify that HTTP/2 was used for replay, enable Advanced Trace in the Log runtime settings. After replay, see the Replay log and note the references to HTTP/2.
Below is an example log from a replay of a HTTP/2 web server.

Action.c(13): The request to server https://<hostname>/" is done with headers:
Action.c(13):     :authority = <hostname>
Action.c(13):     :method = GET
Action.c(13):     :path = /
Action.c(13):     :scheme = https
Action.c(13):     user-agent = Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gec
Action.c(13):     ko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586
Action.c(13):     accept-encoding = gzip, deflate
Action.c(13):     accept-language = en-US
Action.c(13):     accept = */*
Action.c(13): t=2026ms: 139-byte response headers for "
https://<hostname>/" (RelFrameId=1, Internal ID=1)
Action.c(13):     HTTP/2.0 200\r\n
Action.c(13):     Status: 200\r\n
Action.c(13):     Server: nginx\r\n
Action.c(13):     Date: Fri, 03 Jun 2016 07:27:29 GMT\r\n
Action.c(13):     Content-Type: text/html; charset=UTF-8\r\n