17.2.4. Procedure – Replaying HTTP sessions

Purpose: 

To replay HTTP sessions, complete the following steps.

Steps: 

  1. Select File > Add Audit Trail and select an audit trail file. AP opens the file and displays the sessions stored in the file in the Project Trails panel.

  2. Double-click on the session you want to view. The session will be displayed in a new window.

    The session enlists all HTTP exchanges (client requests, and server responses).

    Figure 17.4. HTTP session

    HTTP session
  3. To preview exchanges or images, click the URL. The content will be displayed in the Preview tab. To view the header part of the exchange, select the Headers tab. To view the data part of the exchange, select the Data tab.

    Note

    Only those files will be physically present in the trail that were downloaded from the server. If the client has visited the webpage before, the cached content (for example images) will be enlisted, but cannot be previewed or saved. If the page has been cached, the 304 Not Modified HTTP response is visible in the first line of the Responses part of the Headers tab.

    1. The displayed exchanges are highlighted. To select the highlighting style, right-click in the Preview window, select Style and select the highlighting style.

    2. The displayed exchanges are highlighted according to the file type (for example CSS, HTML, Java, sh, and so on). To select the file type, right-click in the Preview window, select Language and select the file type.

    3. To display line numbers, right-click in the Preview window and enable Line numbers.

  4. To filter for certain exchanges, enter the filter expression in regular expression (regexp) format into the Filtering field and click Apply or press Enter. The number of exchanges matching the filter expression is displayed above the Filtering field.

    • To filter for an expression in all columns, enter the filter expression in the Filtering field.

    • To filter for an expression in a certain column, use the following syntax: <columnname>=<regexp1>. The following columns are available for filtering: id, info, method, status, timestamp, type, url.

      Note

      Only the Timestamp and the Url columns are visible in the tree view. To view data in the other columns, hover the mouse over the exchange. The content of the columns will be displayed in a tooltip.

    • To perform complex filtering, use the following syntax: <columnname1>=<regexp1> <columnname2>=<regexp2>. These expressions are in AND relation.

    • If the regexp contains space, put the expression in quotes: "<regular expression>".

    Example 17.2. Filtering for HTTP exchanges in AP
    timestamp="09/14/12 12:25" url=example.com

    To clear the Filtering field, click Clear.

    Note

    To ensure that you have used a valid filter expression, check the color of the Filtering field.

    • Green: The filter expression is valid (in case of filtering for certain columns).

    • Yellow: The filter expression is valid (in case of filtering for all columns).

    • Red: The filter expression is invalid.

  5. To view the filtered exchanges in Browser mode, click Preview or double-click the exchange.

    Figure 17.5. Browser mode

    Browser mode
    • To list resources, enable Resources. To copy resources to the clipboard, select the resource(s) and press Ctrl+C. To select multiple resources, hold Ctrl while clicking resources in the list. To select multiple adjacent resources, click the first resource and hold Shift while clicking on the last resource. To select all resources, press Ctrl+A.

      • Green: valid resources

      • Blue: missing resources

      • Red: invalid resources, meaning that exchanges were found with the given URL, but all were redirected (code 3xx).

    • To display javascript in Browser mode, enable Javascript.

    • To view the previous exchange (or form data if available), click Previous.

    • To view the next exchange (or form data if available), click Next.

    • To enable slideshow mode (jump to the next exchange every 5 seconds), click Play.

    • To view POST data that was sent in a form, click Fill form data.

  6. To save the files from the session. Right-click the file to save it.

    • To save the request data only, select Save request data.

    • To save the response data only, select Save response data.

    • To save the both request and response data, select Save both.

    To save all the exchanges selected by the filter, click Save Filtered. To save all files from the session, click Save All.