html-proofer 2.3.0 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +3 -2
- data/bin/htmlproof +4 -2
- data/html-proofer.gemspec +1 -0
- data/lib/html/proofer.rb +5 -2
- data/lib/html/proofer/check_runner.rb +3 -2
- data/lib/html/proofer/checks/html.rb +7 -3
- data/lib/html/proofer/version.rb +1 -1
- data/spec/html/proofer/fixtures/html/ignore_script_embeds.html +3 -0
- data/spec/html/proofer/fixtures/links/linkWithRedirect.html +2 -0
- data/spec/html/proofer/fixtures/vcr_cassettes/images/existingImageExternal_html.yml +62 -0
- data/spec/html/proofer/fixtures/vcr_cassettes/images/ignoreAltButNotLink_html_alt_ignore_/_/_.yml +45 -0
- data/spec/html/proofer/fixtures/vcr_cassettes/images/image_missing_protocol_invalid_html.yml +117 -0
- data/spec/html/proofer/fixtures/vcr_cassettes/images/image_missing_protocol_valid_html.yml +62 -0
- data/spec/html/proofer/fixtures/vcr_cassettes/images/missingImageExternal_html.yml +45 -0
- data/spec/html/proofer/fixtures/vcr_cassettes/links/attributeWithDash_html.yml +73 -0
- data/spec/html/proofer/fixtures/vcr_cassettes/links/brokenHashOnTheWeb_html.yml +56 -0
- data/spec/html/proofer/fixtures/vcr_cassettes/links/brokenHashOnTheWeb_html_check_external_hash_true_.yml +719 -0
- data/spec/html/proofer/fixtures/vcr_cassettes/links/brokenHashOnTheWeb_html_only_4xx_true_.yml +56 -0
- data/spec/html/proofer/fixtures/vcr_cassettes/links/brokenLinkExternal_html.yml +96 -0
- data/spec/html/proofer/fixtures/vcr_cassettes/links/brokenUnixLinks_html.yml +156 -0
- data/spec/html/proofer/fixtures/vcr_cassettes/links/checkSSLLinks_html.yml +50 -0
- data/spec/html/proofer/fixtures/vcr_cassettes/links/ensure_typhoeus_options_html_typhoeus_ssl_verifypeer_false_.yml +40 -0
- data/spec/html/proofer/fixtures/vcr_cassettes/links/escape_pipes_html.yml +52 -0
- data/spec/html/proofer/fixtures/vcr_cassettes/links/file_foo_ext_foo_.yml +96 -0
- data/spec/html/proofer/fixtures/vcr_cassettes/links/githubHash_html.yml +73 -0
- data/spec/html/proofer/fixtures/vcr_cassettes/links/linkWithHttps_html.yml +73 -0
- data/spec/html/proofer/fixtures/vcr_cassettes/links/linkWithRedirect_html.yml +236 -0
- data/spec/html/proofer/fixtures/vcr_cassettes/links/linkWithRedirect_html_only_4xx_true_typhoeus_followlocation_false_.yml +318 -0
- data/spec/html/proofer/fixtures/vcr_cassettes/links/linkWithRedirect_html_typhoeus_followlocation_false_.yml +318 -0
- data/spec/html/proofer/fixtures/vcr_cassettes/links/link_missing_protocol_invalid_html.yml +45 -0
- data/spec/html/proofer/fixtures/vcr_cassettes/links/link_missing_protocol_valid_html.yml +73 -0
- data/spec/html/proofer/fixtures/vcr_cassettes/links/nodupe_html.yml +182 -0
- data/spec/html/proofer/fixtures/vcr_cassettes/links/non_standard_characters_html.yml +113 -0
- data/spec/html/proofer/fixtures/vcr_cassettes/links/redirected_error_html.yml +1044 -0
- data/spec/html/proofer/fixtures/vcr_cassettes/links/utf8Link_html.yml +113 -0
- data/spec/html/proofer/fixtures/vcr_cassettes/scripts/script_broken_external_html.yml +45 -0
- data/spec/html/proofer/fixtures/vcr_cassettes/sorting/status_typhoeus_followlocation_false_error_sort_status_.yml +244 -0
- data/spec/html/proofer/fixtures/vcr_cassettes/www_garbalarba_com_href_swap_/garbalarba/_github_.yml +73 -0
- data/spec/html/proofer/fixtures/vcr_cassettes/www_github_com_foofoofoo_biz.yml +115 -0
- data/spec/html/proofer/html_spec.rb +12 -5
- data/spec/html/proofer/images_spec.rb +3 -3
- data/spec/html/proofer/links_spec.rb +6 -6
- data/spec/html/proofer/scripts_spec.rb +1 -2
- data/spec/html/proofer_spec.rb +3 -3
- data/spec/spec_helper.rb +27 -5
- metadata +78 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 199072065aae813f6812515b7738fe44e7061b5c
|
4
|
+
data.tar.gz: bdcb52a9e1ded0ceb863e19969fa1b27dfc583ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f4e700f69c02bdca9bf0e351fcd768b59b6a27f972a0e8687db668c9e9de24babb4daf75129fd178116e58d2f0eb44c4b808ccc7c584ad4c7626c288eeabd1b
|
7
|
+
data.tar.gz: 980595b0f55a55aaeaf4d1a6338c1ddd968bc12ec54fb89fb00f95a34f8812e7d869c351852c5f06ffe52a2bb0df115c07bfb79a72d38d43b76d9d2feec91951
|
data/README.md
CHANGED
@@ -140,6 +140,8 @@ The `HTML::Proofer` constructor takes an optional hash of additional options:
|
|
140
140
|
| `alt_ignore` | An array of Strings or RegExps containing `img`s whose missing `alt` tags are safe to ignore. | `[]` |
|
141
141
|
| `empty_alt_ignore` | If `true`, ignores images with empty alt tags. | `false` |
|
142
142
|
| `check_external_hash` | Checks whether external hashes exist (even if the website exists). This slows the checker down. | `false` |
|
143
|
+
| `check_favicon` | Enables the favicon checker. | `false` |
|
144
|
+
| `check_html` | Enables HTML validation errors from Nokogiri | `false` |
|
143
145
|
|`checks_to_ignore`| An array of Strings indicating which checks you'd like to not perform. | `[]`
|
144
146
|
| `directory_index_file` | Sets the file to look for when a link refers to a directory. | `index.html` |
|
145
147
|
| `disable_external` | If `true`, does not run the external link checker, which can take a lot of time. | `false` |
|
@@ -148,10 +150,9 @@ The `HTML::Proofer` constructor takes an optional hash of additional options:
|
|
148
150
|
| `file_ignore` | An array of Strings or RegExps containing file paths that are safe to ignore. | `[]` |
|
149
151
|
| `href_ignore` | An array of Strings or RegExps containing `href`s that are safe to ignore. Note that non-HTTP(S) URIs are always ignored. | `[]` |
|
150
152
|
| `href_swap` | A hash containing key-value pairs of `RegExp => String`. It transforms links that match `RegExp` into `String` via `gsub`. | `{}` |
|
153
|
+
| `ignore_script_embeds` | When `check_html` is enabled, `script` tags containing markup [are reported as errors](http://git.io/vOovv). Enabling this option ignores those errors. | `false`
|
151
154
|
| `only_4xx` | Only reports errors for links that fall within the 4xx status code range. | `false` |
|
152
155
|
| `url_ignore` | An array of Strings or RegExps containing URLs that are safe to ignore. It affects all HTML attributes. Note that non-HTTP(S) URIs are always ignored. | `[]` |
|
153
|
-
| `check_favicon` | Enables the favicon checker. | `false` |
|
154
|
-
| `check_html` | Enables HTML validation errors from Nokogiri | `false` |
|
155
156
|
| `verbose` | If `true`, outputs extra information as the checking happens. Useful for debugging. | `false` |
|
156
157
|
|
157
158
|
### Configuring Typhoeus and Hydra
|
data/bin/htmlproof
CHANGED
@@ -27,6 +27,8 @@ Mercenary.program(:htmlproof) do |p|
|
|
27
27
|
p.option 'empty_alt_ignore', '--empty-alt-ignore', 'Ignores images with empty alt tags.'
|
28
28
|
p.option 'checks_to_ignore', '--checks-to-ignore check1,[check2,...]', Array, ' An array of Strings indicating which checks you\'d like to not perform.'
|
29
29
|
p.option 'check_external_hash', '--check-external-hash', 'Checks whether external hashes exist (even if the website exists). This slows the checker down (default: `false`).'
|
30
|
+
p.option 'check_favicon', '--check-favicon', 'Enables the favicon checker (default: `false`).'
|
31
|
+
p.option 'check_html', '--check-html', 'Enables HTML validation errors from Nokogiri (default: `false`).'
|
30
32
|
p.option 'directory_index_file', '--directory-index-file', String, 'Sets the file to look for when a link refers to a directory. (default: `index.html`)'
|
31
33
|
p.option 'disable_external', '--disable-external', 'Disables the external link checker (default: `false`)'
|
32
34
|
p.option 'error_sort', '--error-sort SORT', 'Defines the sort order for error output. Can be `path`, `desc`, or `status` (default: `path`).'
|
@@ -34,9 +36,9 @@ Mercenary.program(:htmlproof) do |p|
|
|
34
36
|
p.option 'file_ignore', '--file-ignore file1,[file2,...]', Array, 'Comma-separated list of Strings or RegExps containing file paths that are safe to ignore'
|
35
37
|
p.option 'href_ignore', '--href-ignore link1,[link2,...]', Array, 'Comma-separated list of Strings or RegExps containing `href`s that are safe to ignore.'
|
36
38
|
p.option 'href_swap', '--href-swap re:string,[re:string,...]', Array, 'Comma-separated list of key-value pairs of `RegExp:String`. Transforms links matching `RegExp` into `String`'
|
39
|
+
p.option 'ignore_script_errors', '--ignore-script-errors', 'Ignore `check_html` errors associated with `script`s (default: `false`)'
|
37
40
|
p.option 'only_4xx', '--only-4xx', 'Only reports errors for links that fall within the 4x status code range.'
|
38
|
-
p.option '
|
39
|
-
p.option 'check_html', '--check-html', 'Enables HTML validation errors from Nokogiri (default: `false`).'
|
41
|
+
p.option 'url_ignore', '--url-ignore link1,[link2,...]', Array, 'Comma-separated list of Strings or RegExps containing URLs that are safe to ignore.'
|
40
42
|
p.option 'verbose', '--verbose', 'Enables more verbose logging.'
|
41
43
|
|
42
44
|
p.action do |args, opts|
|
data/html-proofer.gemspec
CHANGED
data/lib/html/proofer.rb
CHANGED
@@ -21,7 +21,7 @@ module HTML
|
|
21
21
|
class Proofer
|
22
22
|
include Utils
|
23
23
|
|
24
|
-
attr_reader :options, :typhoeus_opts, :hydra_opts, :parallel_opts
|
24
|
+
attr_reader :options, :typhoeus_opts, :hydra_opts, :parallel_opts, :validation_opts
|
25
25
|
|
26
26
|
TYPHOEUS_DEFAULTS = {
|
27
27
|
:followlocation => true,
|
@@ -62,6 +62,9 @@ module HTML
|
|
62
62
|
@parallel_opts = opts[:parallel] || {}
|
63
63
|
opts.delete(:parallel)
|
64
64
|
|
65
|
+
@validation_opts = opts[:validation] || {}
|
66
|
+
opts.delete(:validation)
|
67
|
+
|
65
68
|
@options = @proofer_opts.merge(opts)
|
66
69
|
|
67
70
|
@failed_tests = []
|
@@ -124,7 +127,7 @@ module HTML
|
|
124
127
|
|
125
128
|
checks.each do |klass|
|
126
129
|
logger.log :debug, :yellow, "Checking #{klass.to_s.downcase} on #{path} ..."
|
127
|
-
check = Object.const_get(klass).new(@src, path, html, @options, @typhoeus_opts, @hydra_opts, @parallel_opts)
|
130
|
+
check = Object.const_get(klass).new(@src, path, html, @options, @typhoeus_opts, @hydra_opts, @parallel_opts, @validation_opts)
|
128
131
|
check.run
|
129
132
|
result[:external_urls].merge!(check.external_urls)
|
130
133
|
result[:failed_tests].concat(check.issues) if check.issues.length > 0
|
@@ -6,9 +6,9 @@ module HTML
|
|
6
6
|
class CheckRunner
|
7
7
|
|
8
8
|
attr_reader :issues, :src, :path, :options, :typhoeus_opts, :hydra_opts, :parallel_opts, \
|
9
|
-
:external_urls, :href_ignores, :url_ignores, :alt_ignores, :empty_alt_ignore
|
9
|
+
:validation_opts, :external_urls, :href_ignores, :url_ignores, :alt_ignores, :empty_alt_ignore
|
10
10
|
|
11
|
-
def initialize(src, path, html, options, typhoeus_opts, hydra_opts, parallel_opts)
|
11
|
+
def initialize(src, path, html, options, typhoeus_opts, hydra_opts, parallel_opts, validation_opts)
|
12
12
|
@src = src
|
13
13
|
@path = path
|
14
14
|
@html = remove_ignored(html)
|
@@ -16,6 +16,7 @@ module HTML
|
|
16
16
|
@typhoeus_opts = typhoeus_opts
|
17
17
|
@hydra_opts = hydra_opts
|
18
18
|
@parallel_opts = parallel_opts
|
19
|
+
@validation_opts = validation_opts
|
19
20
|
@issues = []
|
20
21
|
@href_ignores = @options[:href_ignore]
|
21
22
|
@url_ignores = @options[:url_ignore]
|
@@ -1,7 +1,6 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
3
|
class HtmlCheck < ::HTML::Proofer::CheckRunner
|
4
|
-
|
5
4
|
# new html5 tags (source: http://www.w3schools.com/html/html5_new_elements.asp)
|
6
5
|
# and svg child tags (source: https://developer.mozilla.org/en-US/docs/Web/SVG/Element)
|
7
6
|
HTML5_TAGS = %w(article aside bdi details dialog figcaption
|
@@ -30,11 +29,16 @@ class HtmlCheck < ::HTML::Proofer::CheckRunner
|
|
30
29
|
|
31
30
|
def run
|
32
31
|
@html.errors.each do |e|
|
32
|
+
message = e.message
|
33
|
+
line = e.line
|
33
34
|
# Nokogiri (or rather libxml2 underhood) only recognizes html4 tags,
|
34
35
|
# so we need to skip errors caused by the new tags in html5
|
35
|
-
next if HTML5_TAGS.include?
|
36
|
+
next if HTML5_TAGS.include? message[/Tag ([\w-]+) invalid/o, 1]
|
37
|
+
|
38
|
+
# tags embedded in scripts are used in templating languages: http://git.io/vOovv
|
39
|
+
next if @validation_opts[:ignore_script_embeds] && message =~ /Element script embeds close tag/
|
36
40
|
|
37
|
-
add_issue(
|
41
|
+
add_issue(message, line)
|
38
42
|
end
|
39
43
|
end
|
40
44
|
end
|
data/lib/html/proofer/version.rb
CHANGED
@@ -7,6 +7,8 @@
|
|
7
7
|
<p>Blah blah blah. <a href="https://help.github.com/changing-author-info/">This is another redirect.</a>. </p>
|
8
8
|
|
9
9
|
<p>Blah blah blah. <a href="http://timclem.wordpress.com/2012/03/01/mind-the-end-of-your-line/">This is a third redirect.</a>. </p>
|
10
|
+
|
11
|
+
<p> <a href="https://github.com/github/repository-sync">and a fourth!</a> </p>
|
10
12
|
</body>
|
11
13
|
|
12
14
|
</html>
|
@@ -0,0 +1,62 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: head
|
5
|
+
uri: http://upload.wikimedia.org/wikipedia/en/thumb/2/22/Heckert_GNU_white.svg/256px-Heckert_GNU_white.svg.png
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Mozilla/5.0 (compatible; HTML Proofer/2.3.0; +https://github.com/gjtorikian/html-proofer)
|
12
|
+
response:
|
13
|
+
status:
|
14
|
+
code: 200
|
15
|
+
message: OK
|
16
|
+
headers:
|
17
|
+
Server:
|
18
|
+
- nginx/1.9.2
|
19
|
+
Date:
|
20
|
+
- Mon, 06 Jul 2015 05:07:46 GMT
|
21
|
+
Content-Type:
|
22
|
+
- image/png
|
23
|
+
Content-Length:
|
24
|
+
- '27063'
|
25
|
+
Connection:
|
26
|
+
- keep-alive
|
27
|
+
X-Object-Meta-Sha1base36:
|
28
|
+
- mm95ioarmv2n0yvfyg4czr9qxzhf44v
|
29
|
+
Last-Modified:
|
30
|
+
- Fri, 18 Oct 2013 02:15:06 GMT
|
31
|
+
Etag:
|
32
|
+
- b02df8baa52837645bd58a219be4d9dc
|
33
|
+
X-Timestamp:
|
34
|
+
- '1382062505.22715'
|
35
|
+
X-Trans-Id:
|
36
|
+
- txe81e86cdeba44675ac9e2-00559a0458
|
37
|
+
X-Varnish:
|
38
|
+
- 2210500677 2206883823, 3151289350 3151285732
|
39
|
+
Via:
|
40
|
+
- 1.1 varnish, 1.1 varnish
|
41
|
+
Accept-Ranges:
|
42
|
+
- bytes
|
43
|
+
Age:
|
44
|
+
- '2250'
|
45
|
+
X-Cache:
|
46
|
+
- cp1061 hit (7), cp1072 frontend hit (1)
|
47
|
+
Strict-Transport-Security:
|
48
|
+
- max-age=31536000
|
49
|
+
Access-Control-Allow-Origin:
|
50
|
+
- "*"
|
51
|
+
Access-Control-Expose-Headers:
|
52
|
+
- Age, Date, Content-Length, Content-Range, X-Content-Duration, X-Cache, X-Varnish
|
53
|
+
Timing-Allow-Origin:
|
54
|
+
- "*"
|
55
|
+
body:
|
56
|
+
encoding: UTF-8
|
57
|
+
string: ''
|
58
|
+
http_version: '1.1'
|
59
|
+
adapter_metadata:
|
60
|
+
effective_url: https://upload.wikimedia.org/wikipedia/en/thumb/2/22/Heckert_GNU_white.svg/256px-Heckert_GNU_white.svg.png
|
61
|
+
recorded_at: Mon, 06 Jul 2015 05:07:46 GMT
|
62
|
+
recorded_with: VCR 2.9.3
|
data/spec/html/proofer/fixtures/vcr_cassettes/images/ignoreAltButNotLink_html_alt_ignore_/_/_.yml
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: head
|
5
|
+
uri: http://www.kakakakakaakkakakakakakakaakakak.biz.foo.net/
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Mozilla/5.0 (compatible; HTML Proofer/2.3.0; +https://github.com/gjtorikian/html-proofer)
|
12
|
+
response:
|
13
|
+
status:
|
14
|
+
code: 0
|
15
|
+
message:
|
16
|
+
headers: {}
|
17
|
+
body:
|
18
|
+
encoding: UTF-8
|
19
|
+
string: ''
|
20
|
+
http_version:
|
21
|
+
adapter_metadata:
|
22
|
+
effective_url: http://www.kakakakakaakkakakakakakakaakakak.biz.foo.net/
|
23
|
+
recorded_at: Mon, 06 Jul 2015 05:07:39 GMT
|
24
|
+
- request:
|
25
|
+
method: get
|
26
|
+
uri: http://www.kakakakakaakkakakakakakakaakakak.biz.foo.net/
|
27
|
+
body:
|
28
|
+
encoding: US-ASCII
|
29
|
+
string: ''
|
30
|
+
headers:
|
31
|
+
User-Agent:
|
32
|
+
- Mozilla/5.0 (compatible; HTML Proofer/2.3.0; +https://github.com/gjtorikian/html-proofer)
|
33
|
+
response:
|
34
|
+
status:
|
35
|
+
code: 0
|
36
|
+
message:
|
37
|
+
headers: {}
|
38
|
+
body:
|
39
|
+
encoding: UTF-8
|
40
|
+
string: ''
|
41
|
+
http_version:
|
42
|
+
adapter_metadata:
|
43
|
+
effective_url: http://www.kakakakakaakkakakakakakakaakakak.biz.foo.net/
|
44
|
+
recorded_at: Mon, 06 Jul 2015 05:07:39 GMT
|
45
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,117 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: head
|
5
|
+
uri: http://upload.wikimedia.org/wikipedia/en/thumb/fooooof.png
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Mozilla/5.0 (compatible; HTML Proofer/2.3.0; +https://github.com/gjtorikian/html-proofer)
|
12
|
+
response:
|
13
|
+
status:
|
14
|
+
code: 404
|
15
|
+
message: Not Found
|
16
|
+
headers:
|
17
|
+
Server:
|
18
|
+
- nginx/1.9.2
|
19
|
+
Date:
|
20
|
+
- Mon, 06 Jul 2015 05:07:40 GMT
|
21
|
+
Content-Type:
|
22
|
+
- text/html; charset=UTF-8
|
23
|
+
Content-Length:
|
24
|
+
- '225'
|
25
|
+
Connection:
|
26
|
+
- keep-alive
|
27
|
+
X-Trans-Id:
|
28
|
+
- tx98122b2ce400416787ffa-00559a0d1c
|
29
|
+
X-Varnish:
|
30
|
+
- 1571621725, 2249256766
|
31
|
+
Via:
|
32
|
+
- 1.1 varnish, 1.1 varnish
|
33
|
+
Accept-Ranges:
|
34
|
+
- bytes
|
35
|
+
Age:
|
36
|
+
- '0'
|
37
|
+
X-Cache:
|
38
|
+
- cp1099 miss (0), cp1063 frontend miss (0)
|
39
|
+
Strict-Transport-Security:
|
40
|
+
- max-age=31536000
|
41
|
+
Access-Control-Allow-Origin:
|
42
|
+
- "*"
|
43
|
+
Access-Control-Expose-Headers:
|
44
|
+
- Age, Date, Content-Length, Content-Range, X-Content-Duration, X-Cache, X-Varnish
|
45
|
+
Timing-Allow-Origin:
|
46
|
+
- "*"
|
47
|
+
body:
|
48
|
+
encoding: UTF-8
|
49
|
+
string: ''
|
50
|
+
http_version: '1.1'
|
51
|
+
adapter_metadata:
|
52
|
+
effective_url: https://upload.wikimedia.org/wikipedia/en/thumb/fooooof.png
|
53
|
+
recorded_at: Mon, 06 Jul 2015 05:07:41 GMT
|
54
|
+
- request:
|
55
|
+
method: get
|
56
|
+
uri: http://upload.wikimedia.org/wikipedia/en/thumb/fooooof.png
|
57
|
+
body:
|
58
|
+
encoding: US-ASCII
|
59
|
+
string: ''
|
60
|
+
headers:
|
61
|
+
User-Agent:
|
62
|
+
- Mozilla/5.0 (compatible; HTML Proofer/2.3.0; +https://github.com/gjtorikian/html-proofer)
|
63
|
+
response:
|
64
|
+
status:
|
65
|
+
code: 404
|
66
|
+
message: Not Found
|
67
|
+
headers:
|
68
|
+
Server:
|
69
|
+
- nginx/1.9.2
|
70
|
+
Date:
|
71
|
+
- Mon, 06 Jul 2015 05:07:41 GMT
|
72
|
+
Content-Type:
|
73
|
+
- text/html; charset=UTF-8
|
74
|
+
Content-Length:
|
75
|
+
- '225'
|
76
|
+
Connection:
|
77
|
+
- keep-alive
|
78
|
+
X-Trans-Id:
|
79
|
+
- tx98122b2ce400416787ffa-00559a0d1c
|
80
|
+
X-Varnish:
|
81
|
+
- 1571621725, 2249257000 2249256766
|
82
|
+
Via:
|
83
|
+
- 1.1 varnish, 1.1 varnish
|
84
|
+
Accept-Ranges:
|
85
|
+
- bytes
|
86
|
+
Age:
|
87
|
+
- '0'
|
88
|
+
X-Cache:
|
89
|
+
- cp1099 miss (0), cp1063 frontend hit (1)
|
90
|
+
Strict-Transport-Security:
|
91
|
+
- max-age=31536000
|
92
|
+
Access-Control-Allow-Origin:
|
93
|
+
- "*"
|
94
|
+
Access-Control-Expose-Headers:
|
95
|
+
- Age, Date, Content-Length, Content-Range, X-Content-Duration, X-Cache, X-Varnish
|
96
|
+
Timing-Allow-Origin:
|
97
|
+
- "*"
|
98
|
+
body:
|
99
|
+
encoding: UTF-8
|
100
|
+
string: |-
|
101
|
+
<html>
|
102
|
+
<head>
|
103
|
+
<title>404 Not Found</title>
|
104
|
+
</head>
|
105
|
+
<body>
|
106
|
+
<h1>404 Not Found</h1>
|
107
|
+
The resource could not be found.<br /><br />
|
108
|
+
Regexp failed to match URI: "/wikipedia/en/thumb/fooooof.png"
|
109
|
+
|
110
|
+
|
111
|
+
</body>
|
112
|
+
</html>
|
113
|
+
http_version: '1.1'
|
114
|
+
adapter_metadata:
|
115
|
+
effective_url: https://upload.wikimedia.org/wikipedia/en/thumb/fooooof.png
|
116
|
+
recorded_at: Mon, 06 Jul 2015 05:07:41 GMT
|
117
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,62 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: head
|
5
|
+
uri: http://upload.wikimedia.org/wikipedia/en/thumb/2/22/Heckert_GNU_white.svg/256px-Heckert_GNU_white.svg.png
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- Mozilla/5.0 (compatible; HTML Proofer/2.3.0; +https://github.com/gjtorikian/html-proofer)
|
12
|
+
response:
|
13
|
+
status:
|
14
|
+
code: 200
|
15
|
+
message: OK
|
16
|
+
headers:
|
17
|
+
Server:
|
18
|
+
- nginx/1.9.2
|
19
|
+
Date:
|
20
|
+
- Mon, 06 Jul 2015 05:07:45 GMT
|
21
|
+
Content-Type:
|
22
|
+
- image/png
|
23
|
+
Content-Length:
|
24
|
+
- '27063'
|
25
|
+
Connection:
|
26
|
+
- keep-alive
|
27
|
+
X-Object-Meta-Sha1base36:
|
28
|
+
- mm95ioarmv2n0yvfyg4czr9qxzhf44v
|
29
|
+
Last-Modified:
|
30
|
+
- Fri, 18 Oct 2013 02:15:06 GMT
|
31
|
+
Etag:
|
32
|
+
- b02df8baa52837645bd58a219be4d9dc
|
33
|
+
X-Timestamp:
|
34
|
+
- '1382062505.22715'
|
35
|
+
X-Trans-Id:
|
36
|
+
- txe81e86cdeba44675ac9e2-00559a0458
|
37
|
+
X-Varnish:
|
38
|
+
- 2210500677 2206883823, 3151285732
|
39
|
+
Via:
|
40
|
+
- 1.1 varnish, 1.1 varnish
|
41
|
+
Accept-Ranges:
|
42
|
+
- bytes
|
43
|
+
Age:
|
44
|
+
- '2249'
|
45
|
+
X-Cache:
|
46
|
+
- cp1061 hit (7), cp1072 frontend miss (0)
|
47
|
+
Strict-Transport-Security:
|
48
|
+
- max-age=31536000
|
49
|
+
Access-Control-Allow-Origin:
|
50
|
+
- "*"
|
51
|
+
Access-Control-Expose-Headers:
|
52
|
+
- Age, Date, Content-Length, Content-Range, X-Content-Duration, X-Cache, X-Varnish
|
53
|
+
Timing-Allow-Origin:
|
54
|
+
- "*"
|
55
|
+
body:
|
56
|
+
encoding: UTF-8
|
57
|
+
string: ''
|
58
|
+
http_version: '1.1'
|
59
|
+
adapter_metadata:
|
60
|
+
effective_url: https://upload.wikimedia.org/wikipedia/en/thumb/2/22/Heckert_GNU_white.svg/256px-Heckert_GNU_white.svg.png
|
61
|
+
recorded_at: Mon, 06 Jul 2015 05:07:45 GMT
|
62
|
+
recorded_with: VCR 2.9.3
|