inspec/test/unit/mock/cmd/http-remote-max-redirs
Keith Walters c2bd0616fe Allow http resource to follow redirects
By specifying a `max_redirects` attribute, the `http` resource worker
will follow any HTTP Redirect response (301, 302, etc...) up to the
limit defined by this attribute. For a local worker, exceeding that
limit will raise a `FaradayMiddleware::RedirectLimitReached` exception.
For a remote worker, the curl command will exit without populating the
`status` and `body` properties.

Signed-off-by: Keith Walters <keith.walters@cattywamp.us>
2019-03-16 20:54:52 -04:00

21 lines
478 B
Text

HTTP/1.1 301 Moved Permanently
Date: Sat, 13 Oct 2018 05:06:12 GMT
Content-Type: text/html
Content-Length: 186
Connection: keep-alive
Server: gws
Location: http://example.com
HTTP/1.1 200 OK
Date: Sat, 13 Oct 2018 05:06:12 GMT
Expires: -1
Cache-Control: private, max-age=0
Content-Type: text/html; charset=ISO-8859-1
Server: gws
X-XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
Accept-Ranges: none
Vary: Accept-Encoding
Transfer-Encoding: chunked
followed redirect