Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added a new example to the Overview section
Tom Scavo committed Jun 11, 2017
1 parent e4eb7ef commit 6c2101a
Showing 1 changed file with 36 additions and 1 deletion.
37 changes: 36 additions & 1 deletion README.md
@@ -263,7 +263,42 @@ $ $BIN_DIR/compute_md_vital_stats.sh -h

### `test_compressed_resources.sh`

TBD
Bash script `test_compressed_resources.sh` tests one or more resources for HTTP Compression:

```Shell
$ $BIN_DIR/test_compressed_resources.sh -d /tmp/out $url1 $url2
2017-06-11T13:20:39Z INFO test_compressed_resources.sh BEGIN
2017-06-11T13:20:39Z INFO test_compressed_resources.sh requesting (compressed) resource: http://md.incommon.org/InCommon/InCommon-metadata-preview.xml
2017-06-11T13:20:43Z INFO conditional_get reading cached content file: /tmp/http_cache/1e6b844a49d1850b82feded72cf83ed7_content
2017-06-11T13:20:43Z INFO test_compressed_resources.sh requesting (compressed) resource: http://md.incommon.org/InCommon/InCommon-metadata-fallback.xml
2017-06-11T13:20:45Z INFO conditional_get reading cached content file: /tmp/http_cache/1727196e5b7593f3b7528c539e7169d2_content
2017-06-11T13:20:46Z INFO test_compressed_resources.sh writing output file: compressed_response_headers.json
2017-06-11T13:20:46Z INFO test_compressed_resources.sh moving output file to dir: /tmp/out
2017-06-11T13:20:46Z INFO test_compressed_resources.sh END
```

The script produces a JSON array containing objects such as the following:

```JavaScript
{
"successFlag": true,
"message": "Integrity of compressed metadata confirmed",
"location": "http://md.incommon.org/InCommon/InCommon-metadata-preview.xml",
"ResponseCode": "200",
"Date": "Sun, 11 Jun 2017 13:10:37 GMT",
"LastModified": "Fri, 09 Jun 2017 19:05:16 GMT",
"ETag": "\"80bc05-5518ba65a1fd5\"",
"ContentLength": "8436741",
"ContentType": "application/samlmetadata+xml",
"ContentEncoding": "gzip"
}
```

Like the previous script, this script also depends on cached metadata. In addition, this script requests each (compressed) resource from the server just-in-time. See the inline help file for details:

```Shell
$ $BIN_DIR/test_compressed_resources.sh -h
```

## Compatibility

0 comments on commit 6c2101a

Please sign in to comment.