entp-ruby-openid 2.2
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.
- data/CHANGELOG +215 -0
- data/INSTALL +47 -0
- data/LICENSE +210 -0
- data/NOTICE +2 -0
- data/README +85 -0
- data/UPGRADE +127 -0
- data/admin/runtests.rb +45 -0
- data/examples/README +32 -0
- data/examples/active_record_openid_store/README +58 -0
- data/examples/active_record_openid_store/XXX_add_open_id_store_to_db.rb +24 -0
- data/examples/active_record_openid_store/XXX_upgrade_open_id_store.rb +26 -0
- data/examples/active_record_openid_store/init.rb +8 -0
- data/examples/active_record_openid_store/lib/association.rb +10 -0
- data/examples/active_record_openid_store/lib/nonce.rb +3 -0
- data/examples/active_record_openid_store/lib/open_id_setting.rb +4 -0
- data/examples/active_record_openid_store/lib/openid_ar_store.rb +57 -0
- data/examples/active_record_openid_store/test/store_test.rb +212 -0
- data/examples/discover +49 -0
- data/examples/rails_openid/README +153 -0
- data/examples/rails_openid/Rakefile +10 -0
- data/examples/rails_openid/app/controllers/application.rb +4 -0
- data/examples/rails_openid/app/controllers/consumer_controller.rb +125 -0
- data/examples/rails_openid/app/controllers/login_controller.rb +45 -0
- data/examples/rails_openid/app/controllers/server_controller.rb +265 -0
- data/examples/rails_openid/app/helpers/application_helper.rb +3 -0
- data/examples/rails_openid/app/helpers/login_helper.rb +2 -0
- data/examples/rails_openid/app/helpers/server_helper.rb +9 -0
- data/examples/rails_openid/app/views/consumer/index.rhtml +81 -0
- data/examples/rails_openid/app/views/layouts/server.rhtml +68 -0
- data/examples/rails_openid/app/views/login/index.rhtml +56 -0
- data/examples/rails_openid/app/views/server/decide.rhtml +26 -0
- data/examples/rails_openid/config/boot.rb +19 -0
- data/examples/rails_openid/config/database.yml +74 -0
- data/examples/rails_openid/config/environment.rb +54 -0
- data/examples/rails_openid/config/environments/development.rb +19 -0
- data/examples/rails_openid/config/environments/production.rb +19 -0
- data/examples/rails_openid/config/environments/test.rb +19 -0
- data/examples/rails_openid/config/routes.rb +24 -0
- data/examples/rails_openid/doc/README_FOR_APP +2 -0
- data/examples/rails_openid/public/404.html +8 -0
- data/examples/rails_openid/public/500.html +8 -0
- data/examples/rails_openid/public/dispatch.cgi +12 -0
- data/examples/rails_openid/public/dispatch.fcgi +26 -0
- data/examples/rails_openid/public/dispatch.rb +12 -0
- data/examples/rails_openid/public/favicon.ico +0 -0
- data/examples/rails_openid/public/images/openid_login_bg.gif +0 -0
- data/examples/rails_openid/public/javascripts/controls.js +750 -0
- data/examples/rails_openid/public/javascripts/dragdrop.js +584 -0
- data/examples/rails_openid/public/javascripts/effects.js +854 -0
- data/examples/rails_openid/public/javascripts/prototype.js +1785 -0
- data/examples/rails_openid/public/robots.txt +1 -0
- data/examples/rails_openid/script/about +3 -0
- data/examples/rails_openid/script/breakpointer +3 -0
- data/examples/rails_openid/script/console +3 -0
- data/examples/rails_openid/script/destroy +3 -0
- data/examples/rails_openid/script/generate +3 -0
- data/examples/rails_openid/script/performance/benchmarker +3 -0
- data/examples/rails_openid/script/performance/profiler +3 -0
- data/examples/rails_openid/script/plugin +3 -0
- data/examples/rails_openid/script/process/reaper +3 -0
- data/examples/rails_openid/script/process/spawner +3 -0
- data/examples/rails_openid/script/process/spinner +3 -0
- data/examples/rails_openid/script/runner +3 -0
- data/examples/rails_openid/script/server +3 -0
- data/examples/rails_openid/test/functional/login_controller_test.rb +18 -0
- data/examples/rails_openid/test/functional/server_controller_test.rb +18 -0
- data/examples/rails_openid/test/test_helper.rb +28 -0
- data/lib/hmac/hmac.rb +112 -0
- data/lib/hmac/sha1.rb +11 -0
- data/lib/hmac/sha2.rb +25 -0
- data/lib/openid.rb +22 -0
- data/lib/openid/association.rb +249 -0
- data/lib/openid/consumer.rb +395 -0
- data/lib/openid/consumer/associationmanager.rb +344 -0
- data/lib/openid/consumer/checkid_request.rb +186 -0
- data/lib/openid/consumer/discovery.rb +497 -0
- data/lib/openid/consumer/discovery_manager.rb +123 -0
- data/lib/openid/consumer/html_parse.rb +134 -0
- data/lib/openid/consumer/idres.rb +523 -0
- data/lib/openid/consumer/responses.rb +150 -0
- data/lib/openid/cryptutil.rb +115 -0
- data/lib/openid/dh.rb +89 -0
- data/lib/openid/extension.rb +39 -0
- data/lib/openid/extensions/ax.rb +539 -0
- data/lib/openid/extensions/oauth.rb +91 -0
- data/lib/openid/extensions/pape.rb +179 -0
- data/lib/openid/extensions/sreg.rb +277 -0
- data/lib/openid/extras.rb +11 -0
- data/lib/openid/fetchers.rb +258 -0
- data/lib/openid/kvform.rb +136 -0
- data/lib/openid/kvpost.rb +58 -0
- data/lib/openid/message.rb +553 -0
- data/lib/openid/protocolerror.rb +12 -0
- data/lib/openid/server.rb +1544 -0
- data/lib/openid/store.rb +10 -0
- data/lib/openid/store/filesystem.rb +272 -0
- data/lib/openid/store/interface.rb +75 -0
- data/lib/openid/store/memcache.rb +109 -0
- data/lib/openid/store/memory.rb +84 -0
- data/lib/openid/store/nonce.rb +68 -0
- data/lib/openid/trustroot.rb +349 -0
- data/lib/openid/urinorm.rb +75 -0
- data/lib/openid/util.rb +119 -0
- data/lib/openid/version.rb +3 -0
- data/lib/openid/yadis.rb +15 -0
- data/lib/openid/yadis/accept.rb +148 -0
- data/lib/openid/yadis/constants.rb +21 -0
- data/lib/openid/yadis/discovery.rb +153 -0
- data/lib/openid/yadis/filters.rb +205 -0
- data/lib/openid/yadis/htmltokenizer.rb +305 -0
- data/lib/openid/yadis/parsehtml.rb +45 -0
- data/lib/openid/yadis/services.rb +42 -0
- data/lib/openid/yadis/xrds.rb +155 -0
- data/lib/openid/yadis/xri.rb +90 -0
- data/lib/openid/yadis/xrires.rb +91 -0
- data/test/data/test_discover/openid_utf8.html +11 -0
- data/test/support/test_data_mixin.rb +127 -0
- data/test/support/test_util.rb +53 -0
- data/test/support/yadis_data.rb +131 -0
- data/test/support/yadis_data/accept.txt +124 -0
- data/test/support/yadis_data/dh.txt +29 -0
- data/test/support/yadis_data/example-xrds.xml +14 -0
- data/test/support/yadis_data/linkparse.txt +587 -0
- data/test/support/yadis_data/n2b64 +650 -0
- data/test/support/yadis_data/test1-discover.txt +137 -0
- data/test/support/yadis_data/test1-parsehtml.txt +152 -0
- data/test/support/yadis_data/test_discover/malformed_meta_tag.html +19 -0
- data/test/support/yadis_data/test_discover/openid.html +11 -0
- data/test/support/yadis_data/test_discover/openid2.html +11 -0
- data/test/support/yadis_data/test_discover/openid2_xrds.xml +12 -0
- data/test/support/yadis_data/test_discover/openid2_xrds_no_local_id.xml +11 -0
- data/test/support/yadis_data/test_discover/openid_1_and_2.html +11 -0
- data/test/support/yadis_data/test_discover/openid_1_and_2_xrds.xml +16 -0
- data/test/support/yadis_data/test_discover/openid_1_and_2_xrds_bad_delegate.xml +17 -0
- data/test/support/yadis_data/test_discover/openid_and_yadis.html +12 -0
- data/test/support/yadis_data/test_discover/openid_no_delegate.html +10 -0
- data/test/support/yadis_data/test_discover/openid_utf8.html +11 -0
- data/test/support/yadis_data/test_discover/yadis_0entries.xml +12 -0
- data/test/support/yadis_data/test_discover/yadis_2_bad_local_id.xml +15 -0
- data/test/support/yadis_data/test_discover/yadis_2entries_delegate.xml +22 -0
- data/test/support/yadis_data/test_discover/yadis_2entries_idp.xml +21 -0
- data/test/support/yadis_data/test_discover/yadis_another_delegate.xml +14 -0
- data/test/support/yadis_data/test_discover/yadis_idp.xml +12 -0
- data/test/support/yadis_data/test_discover/yadis_idp_delegate.xml +13 -0
- data/test/support/yadis_data/test_discover/yadis_no_delegate.xml +11 -0
- data/test/support/yadis_data/test_xrds/=j3h.2007.11.14.xrds +25 -0
- data/test/support/yadis_data/test_xrds/README +12 -0
- data/test/support/yadis_data/test_xrds/delegated-20060809-r1.xrds +34 -0
- data/test/support/yadis_data/test_xrds/delegated-20060809-r2.xrds +34 -0
- data/test/support/yadis_data/test_xrds/delegated-20060809.xrds +34 -0
- data/test/support/yadis_data/test_xrds/no-xrd.xml +7 -0
- data/test/support/yadis_data/test_xrds/not-xrds.xml +2 -0
- data/test/support/yadis_data/test_xrds/prefixsometimes.xrds +34 -0
- data/test/support/yadis_data/test_xrds/ref.xrds +109 -0
- data/test/support/yadis_data/test_xrds/sometimesprefix.xrds +34 -0
- data/test/support/yadis_data/test_xrds/spoof1.xrds +25 -0
- data/test/support/yadis_data/test_xrds/spoof2.xrds +25 -0
- data/test/support/yadis_data/test_xrds/spoof3.xrds +37 -0
- data/test/support/yadis_data/test_xrds/status222.xrds +9 -0
- data/test/support/yadis_data/test_xrds/subsegments.xrds +58 -0
- data/test/support/yadis_data/test_xrds/valid-populated-xrds.xml +39 -0
- data/test/support/yadis_data/trustroot.txt +153 -0
- data/test/support/yadis_data/urinorm.txt +79 -0
- data/test/test_accept.rb +170 -0
- data/test/test_association.rb +268 -0
- data/test/test_associationmanager.rb +918 -0
- data/test/test_ax.rb +690 -0
- data/test/test_checkid_request.rb +293 -0
- data/test/test_consumer.rb +260 -0
- data/test/test_cryptutil.rb +119 -0
- data/test/test_dh.rb +85 -0
- data/test/test_discover.rb +848 -0
- data/test/test_discovery_manager.rb +259 -0
- data/test/test_extension.rb +46 -0
- data/test/test_extras.rb +35 -0
- data/test/test_fetchers.rb +554 -0
- data/test/test_filters.rb +269 -0
- data/test/test_helper.rb +4 -0
- data/test/test_idres.rb +961 -0
- data/test/test_kvform.rb +164 -0
- data/test/test_kvpost.rb +64 -0
- data/test/test_linkparse.rb +100 -0
- data/test/test_message.rb +1115 -0
- data/test/test_nonce.rb +89 -0
- data/test/test_oauth.rb +176 -0
- data/test/test_openid_yadis.rb +177 -0
- data/test/test_pape.rb +248 -0
- data/test/test_parsehtml.rb +79 -0
- data/test/test_responses.rb +63 -0
- data/test/test_server.rb +2455 -0
- data/test/test_sreg.rb +479 -0
- data/test/test_stores.rb +292 -0
- data/test/test_trustroot.rb +111 -0
- data/test/test_urinorm.rb +34 -0
- data/test/test_util.rb +145 -0
- data/test/test_xrds.rb +167 -0
- data/test/test_xri.rb +48 -0
- data/test/test_xrires.rb +67 -0
- data/test/test_yadis_discovery.rb +218 -0
- metadata +268 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Utilities that are only used in the testing code
|
|
2
|
+
require 'stringio'
|
|
3
|
+
|
|
4
|
+
module OpenID
|
|
5
|
+
module TestUtil
|
|
6
|
+
def assert_log_matches(*regexes)
|
|
7
|
+
begin
|
|
8
|
+
old_logger = Util.logger
|
|
9
|
+
log_output = StringIO.new
|
|
10
|
+
Util.logger = Logger.new(log_output)
|
|
11
|
+
result = yield
|
|
12
|
+
ensure
|
|
13
|
+
Util.logger = old_logger
|
|
14
|
+
end
|
|
15
|
+
log_output.rewind
|
|
16
|
+
log_lines = log_output.readlines
|
|
17
|
+
assert_equal(regexes.length, log_lines.length,
|
|
18
|
+
[regexes, log_lines].inspect)
|
|
19
|
+
log_lines.zip(regexes) do |line, regex|
|
|
20
|
+
assert_match(regex, line)
|
|
21
|
+
end
|
|
22
|
+
result
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def assert_log_line_count(num_lines)
|
|
26
|
+
begin
|
|
27
|
+
old_logger = Util.logger
|
|
28
|
+
log_output = StringIO.new
|
|
29
|
+
Util.logger = Logger.new(log_output)
|
|
30
|
+
result = yield
|
|
31
|
+
ensure
|
|
32
|
+
Util.logger = old_logger
|
|
33
|
+
end
|
|
34
|
+
log_output.rewind
|
|
35
|
+
log_lines = log_output.readlines
|
|
36
|
+
assert_equal(num_lines, log_lines.length)
|
|
37
|
+
result
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def silence_logging
|
|
41
|
+
begin
|
|
42
|
+
old_logger = Util.logger
|
|
43
|
+
log_output = StringIO.new
|
|
44
|
+
Util.logger = Logger.new(log_output)
|
|
45
|
+
result = yield
|
|
46
|
+
ensure
|
|
47
|
+
Util.logger = old_logger
|
|
48
|
+
end
|
|
49
|
+
result
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
|
|
2
|
+
require 'uri'
|
|
3
|
+
require 'openid/yadis/constants'
|
|
4
|
+
require 'openid/yadis/discovery'
|
|
5
|
+
require 'openid/extras'
|
|
6
|
+
require 'openid/util'
|
|
7
|
+
|
|
8
|
+
module OpenID
|
|
9
|
+
|
|
10
|
+
module YadisData
|
|
11
|
+
|
|
12
|
+
include TestDataMixin
|
|
13
|
+
include TestUtil
|
|
14
|
+
|
|
15
|
+
TESTLIST = [
|
|
16
|
+
# success, input_name, id_name, result_name
|
|
17
|
+
[true, "equiv", "equiv", "xrds"],
|
|
18
|
+
[true, "header", "header", "xrds"],
|
|
19
|
+
[true, "lowercase_header", "lowercase_header", "xrds"],
|
|
20
|
+
[true, "xrds", "xrds", "xrds"],
|
|
21
|
+
[true, "xrds_ctparam", "xrds_ctparam", "xrds_ctparam"],
|
|
22
|
+
[true, "xrds_ctcase", "xrds_ctcase", "xrds_ctcase"],
|
|
23
|
+
[false, "xrds_html", "xrds_html", "xrds_html"],
|
|
24
|
+
[true, "redir_equiv", "equiv", "xrds"],
|
|
25
|
+
[true, "redir_header", "header", "xrds"],
|
|
26
|
+
[true, "redir_xrds", "xrds", "xrds"],
|
|
27
|
+
[false, "redir_xrds_html", "xrds_html", "xrds_html"],
|
|
28
|
+
[true, "redir_redir_equiv", "equiv", "xrds"],
|
|
29
|
+
[false, "404_server_response", nil, nil],
|
|
30
|
+
[false, "404_with_header", nil, nil],
|
|
31
|
+
[false, "404_with_meta", nil, nil],
|
|
32
|
+
[false, "201_server_response", nil, nil],
|
|
33
|
+
[false, "500_server_response", nil, nil],
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
@@example_xrds_file = 'example-xrds.xml'
|
|
37
|
+
@@default_test_file = 'test1-discover.txt'
|
|
38
|
+
@@discover_tests = {}
|
|
39
|
+
|
|
40
|
+
def readTests(filename)
|
|
41
|
+
data = read_data_file(filename, false)
|
|
42
|
+
tests = {}
|
|
43
|
+
data.split("\f\n", -1).each { |case_|
|
|
44
|
+
name, content = case_.split("\n", 2)
|
|
45
|
+
tests[name] = content
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return tests
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def getData(filename, name)
|
|
52
|
+
if !@@discover_tests.member?(filename)
|
|
53
|
+
@@discover_tests[filename] = readTests(filename)
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
file_tests = @@discover_tests[filename]
|
|
57
|
+
return file_tests[name]
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def fillTemplate(test_name, template, base_url, example_xrds)
|
|
61
|
+
mapping = [
|
|
62
|
+
['URL_BASE/', base_url],
|
|
63
|
+
['<XRDS Content>', example_xrds],
|
|
64
|
+
['YADIS_HEADER', Yadis::YADIS_HEADER_NAME],
|
|
65
|
+
['NAME', test_name],
|
|
66
|
+
]
|
|
67
|
+
|
|
68
|
+
mapping.each { |k, v|
|
|
69
|
+
template = template.gsub(/#{k}/, v)
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
return template
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def generateSample(test_name, base_url,
|
|
76
|
+
example_xrds=nil,
|
|
77
|
+
filename=@@default_test_file)
|
|
78
|
+
if example_xrds.nil?
|
|
79
|
+
example_xrds = read_data_file(@@example_xrds_file, false)
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
begin
|
|
83
|
+
template = getData(filename, test_name)
|
|
84
|
+
rescue Errno::ENOENT
|
|
85
|
+
raise ArgumentError(filename)
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
return fillTemplate(test_name, template, base_url, example_xrds)
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
def generateResult(base_url, input_name, id_name, result_name, success)
|
|
92
|
+
uri = URI::parse(base_url)
|
|
93
|
+
|
|
94
|
+
input_url = (uri + input_name).to_s
|
|
95
|
+
|
|
96
|
+
# If the name is None then we expect the protocol to fail, which
|
|
97
|
+
# we represent by None
|
|
98
|
+
if id_name.nil?
|
|
99
|
+
Util.assert(result_name.nil?)
|
|
100
|
+
return input_url, DiscoveryFailure
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
result = generateSample(result_name, base_url)
|
|
104
|
+
headers, content = result.split("\n\n", 2)
|
|
105
|
+
header_lines = headers.split("\n")
|
|
106
|
+
|
|
107
|
+
ctype = nil
|
|
108
|
+
header_lines.each { |header_line|
|
|
109
|
+
if header_line.starts_with?('Content-Type:')
|
|
110
|
+
_, ctype = header_line.split(':', 2)
|
|
111
|
+
ctype = ctype.strip()
|
|
112
|
+
break
|
|
113
|
+
else
|
|
114
|
+
ctype = nil
|
|
115
|
+
end
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
id_url = (uri + id_name).to_s
|
|
119
|
+
result = Yadis::DiscoveryResult.new(input_url)
|
|
120
|
+
result.normalized_uri = id_url
|
|
121
|
+
|
|
122
|
+
if success
|
|
123
|
+
result.xrds_uri = (uri + result_name).to_s
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
result.content_type = ctype
|
|
127
|
+
result.response_text = content
|
|
128
|
+
return [input_url, result]
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
end
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# Accept: [Accept: header value from RFC2616,
|
|
2
|
+
# http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html]
|
|
3
|
+
# Available: [whitespace-separated content types]
|
|
4
|
+
# Expected: [Accept-header like list, containing the available content
|
|
5
|
+
# types with their q-values]
|
|
6
|
+
|
|
7
|
+
Accept: */*
|
|
8
|
+
Available: text/plain
|
|
9
|
+
Expected: text/plain; q=1.0
|
|
10
|
+
|
|
11
|
+
Accept: */*
|
|
12
|
+
Available: text/plain, text/html
|
|
13
|
+
Expected: text/plain; q=1.0, text/html; q=1.0
|
|
14
|
+
|
|
15
|
+
# The order matters
|
|
16
|
+
Accept: */*
|
|
17
|
+
Available: text/html, text/plain
|
|
18
|
+
Expected: text/html; q=1.0, text/plain; q=1.0
|
|
19
|
+
|
|
20
|
+
Accept: text/*, */*; q=0.9
|
|
21
|
+
Available: text/plain, image/jpeg
|
|
22
|
+
Expected: text/plain; q=1.0, image/jpeg; q=0.9
|
|
23
|
+
|
|
24
|
+
Accept: text/*, */*; q=0.9
|
|
25
|
+
Available: image/jpeg, text/plain
|
|
26
|
+
Expected: text/plain; q=1.0, image/jpeg; q=0.9
|
|
27
|
+
|
|
28
|
+
# wildcard subtypes still reject differing main types
|
|
29
|
+
Accept: text/*
|
|
30
|
+
Available: image/jpeg, text/plain
|
|
31
|
+
Expected: text/plain; q=1.0
|
|
32
|
+
|
|
33
|
+
Accept: text/html
|
|
34
|
+
Available: text/html
|
|
35
|
+
Expected: text/html; q=1.0
|
|
36
|
+
|
|
37
|
+
Accept: text/html, text/*
|
|
38
|
+
Available: text/html
|
|
39
|
+
Expected: text/html; q=1.0
|
|
40
|
+
|
|
41
|
+
Accept: text/html, text/*
|
|
42
|
+
Available: text/plain, text/html
|
|
43
|
+
Expected: text/plain; q=1.0, text/html; q=1.0
|
|
44
|
+
|
|
45
|
+
Accept: text/html, text/*; q=0.9
|
|
46
|
+
Available: text/plain, text/html
|
|
47
|
+
Expected: text/html; q=1.0, text/plain; q=0.9
|
|
48
|
+
|
|
49
|
+
# If a more specific type has a higher q-value, then the higher value wins
|
|
50
|
+
Accept: text/*; q=0.9, text/html
|
|
51
|
+
Available: text/plain, text/html
|
|
52
|
+
Expected: text/html; q=1.0, text/plain; q=0.9
|
|
53
|
+
|
|
54
|
+
Accept: */*, text/*; q=0.9, text/html; q=0.1
|
|
55
|
+
Available: text/plain, text/html, image/monkeys
|
|
56
|
+
Expected: image/monkeys; q=1.0, text/plain; q=0.9, text/html; q=0.1
|
|
57
|
+
|
|
58
|
+
Accept: text/*, text/html; q=0
|
|
59
|
+
Available: text/html
|
|
60
|
+
Expected:
|
|
61
|
+
|
|
62
|
+
Accept: text/*, text/html; q=0
|
|
63
|
+
Available: text/html, text/plain
|
|
64
|
+
Expected: text/plain; q=1.0
|
|
65
|
+
|
|
66
|
+
Accept: text/html
|
|
67
|
+
Available: text/plain
|
|
68
|
+
Expected:
|
|
69
|
+
|
|
70
|
+
Accept: application/xrds+xml, text/html; q=0.9
|
|
71
|
+
Available: application/xrds+xml, text/html
|
|
72
|
+
Expected: application/xrds+xml; q=1.0, text/html; q=0.9
|
|
73
|
+
|
|
74
|
+
Accept: application/xrds+xml, */*; q=0.9
|
|
75
|
+
Available: application/xrds+xml, text/html
|
|
76
|
+
Expected: application/xrds+xml; q=1.0, text/html; q=0.9
|
|
77
|
+
|
|
78
|
+
Accept: application/xrds+xml, application/xhtml+xml; q=0.9, text/html; q=0.8, text/xml; q=0.7
|
|
79
|
+
Available: application/xrds+xml, text/html
|
|
80
|
+
Expected: application/xrds+xml; q=1.0, text/html; q=0.8
|
|
81
|
+
|
|
82
|
+
# See http://www.rfc-editor.org/rfc/rfc3023.txt, section A.13
|
|
83
|
+
Accept: application/xrds
|
|
84
|
+
Available: application/xrds+xml
|
|
85
|
+
Expected:
|
|
86
|
+
|
|
87
|
+
Accept: application/xrds+xml
|
|
88
|
+
Available: application/xrds
|
|
89
|
+
Expected:
|
|
90
|
+
|
|
91
|
+
Accept: application/xml
|
|
92
|
+
Available: application/xrds+xml
|
|
93
|
+
Expected:
|
|
94
|
+
|
|
95
|
+
Available: application/xrds+xml
|
|
96
|
+
Accept: application/xml
|
|
97
|
+
Expected:
|
|
98
|
+
|
|
99
|
+
Available:
|
|
100
|
+
Accept: not_a_content_type
|
|
101
|
+
Expected:
|
|
102
|
+
|
|
103
|
+
Available: text/html
|
|
104
|
+
Accept: not_a_content_type, text/html
|
|
105
|
+
Expected: text/html; q=1.0
|
|
106
|
+
|
|
107
|
+
#################################################
|
|
108
|
+
# The tests below this line are documentation of how this library
|
|
109
|
+
# works. If the implementation changes, it's acceptable to change the
|
|
110
|
+
# test to reflect that. These are specified so that we can make sure
|
|
111
|
+
# that the current implementation actually works the way that we
|
|
112
|
+
# expect it to given these inputs.
|
|
113
|
+
|
|
114
|
+
Accept: text/html;level=1
|
|
115
|
+
Available: text/html
|
|
116
|
+
Expected: text/html; q=1.0
|
|
117
|
+
|
|
118
|
+
Accept: text/html; level=1, text/html; level=9; q=0.1
|
|
119
|
+
Available: text/html
|
|
120
|
+
Expected: text/html; q=1.0
|
|
121
|
+
|
|
122
|
+
Accept: text/html; level=9; q=0.1, text/html; level=1
|
|
123
|
+
Available: text/html
|
|
124
|
+
Expected: text/html; q=1.0
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
130706940119084053627151828062879423433929180135817317038378606310097533503449582079984816816837125851552273641820339909167103200910805078308128174143174269944095368580519322913514764528012639683546377014716235962867583443566164615728897857285824741767070432119909660645255499710701356135207437699643611094585 139808169914464096465921128085565621767096724855516655439365028496569658038844954238931647642811548254956660405394116677296461848124300258439895306367561416289126854788101396379292925819850897858045772500578222021901631436550118958972312221974009238050517034542286574826081826542722270952769078386418682059418
|
|
2
|
+
91966407878983240112417790733941098492087186469785726449910011271065622315680646030230288265496017310433513856308693810812043160919214636748486185212617634222158204354206411031403206076739932806412551605172319515223573351072757800448643935018534945933808900467686115619932664888581913179496050117713298715475 88086484332488517006277516020842172054013692832175783214603951240851750819999098631851571207693874357651112736088114133607400684776234181681933311972926752846692615822043533641407510569745606256772455614745111122033229877596984718963046218854103292937700694160593653595134512369959987897086639788909618660591
|
|
3
|
+
94633950701209990078055218830969910271587805983595045023718108184189787131629772007048606080263109446462048743696369276578815611098215686598630889831104860221067872883514840819381234786050098278403321905311637820524177879167250981289318356078312300538871435101338967079907049912435983871847334104247675360099 136836393035803488129856151345450008294260680733328546556640578838845312279198933806383329293483852515700876505956362639881210101974254765087350842271260064592406308509078284840473735904755203614987286456952991025347168970462354352741159076541157478949094536405618626397435745496863324654768971213730622037771
|
|
4
|
+
24685127248019769965088146297942173464487677364928435784091685260262292485380918213538979925891771204729738138857126454465630594391449913947358655368215901119137728648638547728497517587701248406019427282237279437409508871300675355166059811431191200555457304463617727969228965042729205402243355816702436970430 103488011917988946858248200111251786178288940265978921633592888293430082248387786443813155999158786903216094876295371112716734481877806417714913656921169196196571699893360825510307056269738593971532017994987406325068886420548597161498019372380511676314312298122272401348856314619382867707981701472607230523868
|
|
5
|
+
116791045850880292989786005885944774698035781824784400772676299590038746153860847252706167458966356897309533614849402276819438194497464696186624618374179812548893947178936305721131565012344462048549467883494038577857638815386798694225798517783768606048713198211730870155881426709644960689953998714045816205549 25767875422998856261320430397505398614439586659207416236135894343577952114994718158163212134503751463610021489053571733974769536157057815413209619147486931502025658987681202196476489081257777148377685478756033509708349637895740799542063593586769082830323796978935454479273531157121440998804334199442003857410
|
|
6
|
+
75582226959658406842894734694860761896800153014775231713388264961517169436476322183886891849966756849783437334069692683523296295601533803799559985845105706728538458624387103621364117548643541824878550074680443708148686601108223917493525070861593238005735446708555769966855130921562955491250908613793521520082 51100990616369611694975829054222013346248289055987940844427061856603230021472379888102172458517294080775792439385531234808129302064303666640376750139242970123503857186428797403843206765926798353022284672682073397573130625177187185114726049347844460311761033584101482859992951420083621362870301150543916815123
|
|
7
|
+
22852401165908224137274273646590366934616265607879280260563022941455466297431255072303172649495519837876946233272420969249841381161312477263365567831938496555136366981954001163034914812189448922853839616662859772087929140818377228980710884492996109434435597500854043325062122184466315338260530734979159890875 35017410720028595029711778101507729481023945551700945988329114663345341120595162378885287946069695772429641825579528116641336456773227542256911497084242947904528367986325800537695079726856460817606404224094336361853766354225558025931211551975334149258299477750615397616908655079967952372222383056221992235704
|
|
8
|
+
37364490883518159794654045194678325635036705086417851509136183713863262621334636905291385255662750747808690129471989906644041585863034419130023070856805511017402434123099100618568335168939301014148587149578150068910141065808373976114927339040964292334109797421173369274978107389084873550233108940239410902552 40916262212189137562350357241447034318002130016858244002788189310078477605649010031339865625243230798681216437501833540185827501244378529230150467789369234869122179247196276164931090039290879808162629109742198951942358028123056268054775108592325500609335947248599688175189333996086475013450537086042387719925
|
|
9
|
+
42030470670714872936404499074069849778147578537708230270030877866700844337372497704027708080369726758812896818567830863540507961487472657570488625639077418109017434494794778542739932765561706796300920251933107517954265066804108669800167526425723377411855061131982689717887180411017924173629124764378241885274 124652439272864857598747946875599560379786580730218192165733924418687522301721706620565030507816884907589477351553268146177293719586287258662025940181301472851649975563004543250656807255226609296537922304346339513054316391667044301386950180277940536542183725690479451746977789001659540839582630251935163344393
|
|
10
|
+
33176766914206542084736303652243484580303865879984981189372762326078776390896986743451688462101732968104375838228070296418541745483112261133079756514082093269959937647525005374035326747696591842313517634077723301677759648869372517403529488493581781546743147639937580084065663597330159470577639629864369972900 67485835091897238609131069363014775606263390149204621594445803179810038685760826651889895397414961195533694176706808504447269558421955735607423135937153901140512527504198912146656610630396284977496295289999655140295415981288181545277299615922576281262872097567020980675200178329219970170480653040350512964539
|
|
11
|
+
131497983897702298481056962402569646971797912524360547236788650961059980711719600424210346263081838703940277066368168874781981151411096949736205282734026497995296147418292226818536168555712128736975034272678008697869326747592750850184857659420541708058277866000692785617873742438060271311159568468507825422571 5400380840349873337222394910303409203226429752629134721503171858543984393161548520471799318518954232197106728096866840965784563043721652790856860155702760027304915133166173298206604451826182024471262142046935060360564569939062438160049193241369468208458085699995573492688298015026628427440418009025072261296
|
|
12
|
+
83265103005695640943261961853521077357830295830250157593141844209296716788437615940096402365505416686459260302419338241462783388722843946886845478224048360927114533590583464979009731440049610985062455108831881153988321298531365779084012803908832525921630534096740755274371500276660832724874701671184539131864 141285570207910287798371174771658911045525474449663877845558585668334618068814605961306961485855329182957174312715910923324965889174835444049526313968571611940626279733302104955951067959291852710640374412577070764165811275030632465290729619533330733368808295932659463215921521905553936914975786500018720073003
|
|
13
|
+
68435028583616495789148116911096163791710022987677894923742899873596891423986951658100606742052014161171185231735413902875605720814417622409817842932759492013585936536452615480700628719795872201528559780249210820284350401473564919576289210869896327937002173624497942136329576506818749730506884927872345019446 134655528287263100540003157571441260698452262106680191153945271167894435782028803135774578949200580551016388918860856991026082917835209212892423567114480975540305860034439015788120390011692862968771136814777768281366591257663821495720134621172848947971117885754539770645621669309650476331439675400544167728223
|
|
14
|
+
97765390064836080322590528352647421920257073063706996347334558390461274981996865736612531330863478931481491964338380362350271734683183807511097331539820133036984271653285063355715726806139083282458695728902452215405696318402583540317419929113959816258829534543044153959951908676300847164682178008704099351835 92552521881196975294401505656851872247567784546370503402756239533783651371688190302773864319828182042605239246779598629409815474038541272600580320815319709309111399294952620375093803971373108792300726524826209329889463854451846561437729676142864421966497641824498079067929811613947148353921163336822026640804
|
|
15
|
+
145767094672933012300753301037546647564595762930138884463767054235112032706630891961371504668013023047595721138624016493638510710257541241706724342585654715468628355455898091951826598092812212209834746162089753649871544789379424903025374228231365026585872808685759231756517703720396301355299998059523896918448 116669462839999965355861187716880953863237226719689755457884414384663576662696981997535568446560375442532084973721539944428004043491468494548231348032618218312515409944970197902589794303562379864012797605284844016184274353252071642511293089390472576498394410829972525726474727579603392265177009323768966538608
|
|
16
|
+
34172517877854802711907683049441723730724885305592620486269966708379625109832852005775048584124451699198484092407720344962116726808090368739361658889584507734617844212547181476646725256303630128954338675520938806905779837227983648887192531356390902975904503218654196581612781227843742951241442641220856414232 126013077261793777773236390821108423367648447987653714614732477073177878509574051196587476846560696305938891953527959347566502332765820074506907037627115954790645652211088723122982633069089920979477728376746424256704724173255656757918995039125823421607024407307091796807227896314403153380323770001854211384322
|
|
17
|
+
9979624731056222925878866378063961280844793874828281622845276060532093809300121084179730782833657205171434732875093693074415298975346410131191865198158876447591891117577190438695367929923494177555818480377241891190442070100052523008290671797937772993634966511431668500154258765510857129203107386972819651767 76559085024395996164590986654274454741199399364851956129137304209855150918182685643729981600389513229011956888957763987167398150792454613751473654448162776379362213885827651020309844507723069713820393068520302223477225569348080362344052033711960892643036147232270133731530049660264526964146237693063093765111
|
|
18
|
+
18162696663677410793062235946366423954875282212790518677684260521370996677183041664345920941714064628111537529793170736292618705900247450994864220481135611781148410617609559050220262121494712903009168783279356915189941268264177631458029177102542745167475619936272581126346266816618866806564180995726437177435 63244550218824945129624987597134280916829928261688093445040235408899092619821698537312158783367974202557699994650667088974727356690181336666077506063310290098995215324552449858513870629176838494348632073938023916155113126203791709810160925798130199717340478393420816876665127594623142175853115698049952126277
|
|
19
|
+
4817943161362708117912118300716778687157593557807116683477307391846133734701449509121209661982298574607233039490570567781316652698287671086985501523197566560479906850423709894582834963398034434055472063156147829131181965140631257939036683622084290629927807369457311894970308590034407761706800045378158588657 61612160237840981966750225147965256022861527286827877531373888434780789812764688703260066154973576040405676432586962624922734102370509771313805122788566405984830112657060375568510809122230960988304085950306616401218206390412815884549481965750553137717475620505076144744211331973240555181377832337912951699135
|
|
20
|
+
36363324947629373144612372870171042343590861026293829791335153646774927623889458346817049419803031378037141773848560341251355283891019532059644644509836766167835557471311319194033709837770615526356168418160386395260066262292757953919140150454538786106958252854181965875293629955562111756775391296856504912587 86831561031659073326747216166881733513938228972332631084118628692228329095617884068498116676787029033973607066377816508795286358748076949738854520048303930186595481606562375516134920902325649683618195251332651685732712539073110524182134321873838204219194459231650917098791250048469346563303077080880339797744
|
|
21
|
+
26406869969418301728540993821409753036653370247174689204659006239823766914991146853283367848649039747728229875444327879875275718711878211919734397349994000106499628652960403076186651083084423734034070082770589453774926850920776427074440483233447839259180467805375782600203654373428926653730090468535611335253 100139935381469543084506312717977196291289016554846164338908226931204624582010530255955411615528804421371905642197394534614355186795223905217732992497673429554618838376065777445760355552020655667172127543653684405493978325270279321013143828897100500212200358450649158287605846102419527584313353072518101626851
|
|
22
|
+
92613116984760565837109105383781193800503303131143575169488835702472221039082994091847595094556327985517286288659598094631489552181233202387028607421487026032402972597880028640156629614572656967808446397456622178472130864873587747608262139844319805074476178618930354824943672367046477408898479503054125369731 30023391082615178562263328892343821010986429338255434046051061316154579824472412477397496718186615690433045030046315908170615910505869972621853946234911296439134838951047107272129711854649412919542407760508235711897489847951451200722151978578883748353566191421685659370090024401368356823252748749449302536931
|
|
23
|
+
31485815361342085113278193504381994806529237123359718043079410511224607873725611862217941085749929342777366642477711445011074784469367917758629403998067347054115844421430072631339788256386509261291675080191633908849638316409182455648806133048549359800886124554879661473112614246869101243501787363247762961784 114503770698890543429251666713050844656853278831559195214556474458830029271801818536133531843456707474500106283648085144619097572354066554819887152106174400667929098257361286338795493838820850475790977445807435511982704395422526800272723708548541616513134676140304653112325071112865020365664833601046215694089
|
|
24
|
+
76882090884790547431641385530818076533805072109483843307806375918023300052767710853172670987385376253156912268523505310624133905633437815297307463917718596711590885553760690350221265675690787249135345226947453988081566088302642706234126002514517416493192624887800567412565527886687096028028124049522890448168 15056463217273240496622619354104573042767532856243223052125822509781815362480522535564283485059790932505429110157271454207173426525345813426696743168079246510944969446574354255284952839036431873039487144279164893710061580467579842173706653409487110282515691099753380094215805485573768509475850463001549608836
|
|
25
|
+
52345178981230648108672997265819959243255047568833938156267924185186047373470984278294897653277996726416846430969793375429223610099546622112048283560483136389901514170116723365811871938630317974150540909650396429631704968748113009366339718498979597226137532343384889080245796447593572468846438769413505393967 32148494517199936472358017244372701214529606506776255341152991328091526865643069587953759877295255050519124541457805199596762210567333445908166076384465183589342153762720515477404466193879418014196727238972417616122646440870364200208488239778452378059236162633837824948613596114768455832408342040970780086
|
|
26
|
+
41095268619128788015767564971105114602454449306041732792746397800275041704886345704294273937217484580365505320134717320083763349380629342859670693445658118959823430378844830923452105707338162448974869312012791385772125813291388247857971218575518319578818336960572244046567099555399203328678654466958536663208 92166550199033418923713824997841892577149715275633481076285269142670107687867024550593869464613175882141630640739938334001211714884975032600306279287443909448541179109981755796752132502127330056736913454039526413284519137059580845856736918773597087836203497066909257930043736166431682872083389105176299181629
|
|
27
|
+
40049143661018504441607875135884755310012910557581028447435354354754245291878800571089144452035026644953322330676651798951447670184106450649737772686119714700743396359069052813433030118630105307022867200053964644574786137276428546712005171080129190959914708907200288299169344380390093918556722227705114244981 108159089972386282154772900619022507336076619354549601813179459338897131937353741544606392560724999980281424266891537298473163753022749859939445293926707568015958367188089915420630082556748668489756475027008449860889202622698060097015044886961901650857610841562477736791450080980702347705778074391774667412741
|
|
28
|
+
69905259478181995876884927656894491893594530150260951315109404530530357998889589977208787140430938039028941393673520799460431992051993157468616168400324834880926190141581037597526917869362292931957289043707855837933490285814769110495657056206391880865972389421774822461752702336812585852278453803972600333734 71821415380277072313878763768684432371552628204186742842154591000123020597011744840460964835414360968627162765288463383113375595799297552681618876474019263288277398833725479226930770694271622605114061622753165584075733358178384410640349907375170170910499615355511313349300918885560131539570707695789106185664
|
|
29
|
+
26945345439378873515011714350080059082081595419023056538696949766471272811362104837806324694947413603019863785876836706911406330379274553386254346050697348395574746891556054334903838949157798006141473389066020212044825140294048709654273698482867946522782450500680195477050110145664069582549935651920545151500 80313315938584480048642653013876614091607852535582224914294013785054094052454758327935781971746329853786568549510067442145637007308960551652864942042189241081946607011847245280773379099020221884296226818685556430275385068764313042226925852500883894269809033380734632866477789520106865758504064806906234130588
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!-- Sample XRDS file at: NAME -->
|
|
3
|
+
<xrds:XRDS
|
|
4
|
+
xmlns:xrds="xri://$xrds"
|
|
5
|
+
xmlns="xri://$xrd*($v*2.0)">
|
|
6
|
+
<XRD>
|
|
7
|
+
|
|
8
|
+
<Service priority="0">
|
|
9
|
+
<Type>http://example.com/</Type>
|
|
10
|
+
<URI>http://www.openidenabled.com/</URI>
|
|
11
|
+
</Service>
|
|
12
|
+
|
|
13
|
+
</XRD>
|
|
14
|
+
</xrds:XRDS>
|
|
@@ -0,0 +1,587 @@
|
|
|
1
|
+
Num Tests: 72
|
|
2
|
+
|
|
3
|
+
OpenID link parsing test cases
|
|
4
|
+
Copyright (C) 2005-2008, JanRain, Inc.
|
|
5
|
+
See COPYING for license information.
|
|
6
|
+
|
|
7
|
+
File format
|
|
8
|
+
-----------
|
|
9
|
+
|
|
10
|
+
All text before the first triple-newline (this chunk) should be ignored.
|
|
11
|
+
|
|
12
|
+
This file may be interpreted as Latin-1 or UTF-8.
|
|
13
|
+
|
|
14
|
+
Test cases separated by three line separators (`\n\n\n'). The test
|
|
15
|
+
cases consist of a headers section followed by a data block. These are
|
|
16
|
+
separated by a double newline. The headers consist of the header name,
|
|
17
|
+
followed by a colon, a space, the value, and a newline. There must be
|
|
18
|
+
one, and only one, `Name' header for a test case. There may be zero or
|
|
19
|
+
more link headers. The `Link' header consists of whitespace-separated
|
|
20
|
+
attribute pairs. A link header with an empty string as a value
|
|
21
|
+
indicates an empty but present link tag. The attribute pairs are `='
|
|
22
|
+
separated and not quoted.
|
|
23
|
+
|
|
24
|
+
Optional Links and attributes have a trailing `*'. A compilant
|
|
25
|
+
implementation may produce this as output or may not. A compliant
|
|
26
|
+
implementation will not produce any output that is absent from this
|
|
27
|
+
file.
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
Name: No link tag at all
|
|
31
|
+
|
|
32
|
+
<html>
|
|
33
|
+
<head>
|
|
34
|
+
</head>
|
|
35
|
+
</html>
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
Name: Link element first
|
|
39
|
+
|
|
40
|
+
<link>
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
Name: Link inside HTML, not head
|
|
44
|
+
|
|
45
|
+
<html>
|
|
46
|
+
<link>
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
Name: Link inside head, not html
|
|
50
|
+
|
|
51
|
+
<head>
|
|
52
|
+
<link>
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
Name: Link inside html, after head
|
|
56
|
+
|
|
57
|
+
<html>
|
|
58
|
+
<head>
|
|
59
|
+
</head>
|
|
60
|
+
<link>
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
Name: Link inside html, before head
|
|
64
|
+
|
|
65
|
+
<html>
|
|
66
|
+
<link>
|
|
67
|
+
<head>
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
Name: Link before html and head
|
|
71
|
+
|
|
72
|
+
<link>
|
|
73
|
+
<html>
|
|
74
|
+
<head>
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
Name: Link after html document with head
|
|
78
|
+
|
|
79
|
+
<html>
|
|
80
|
+
<head>
|
|
81
|
+
</head>
|
|
82
|
+
</html>
|
|
83
|
+
<link>
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
Name: Link inside html inside head, inside another html
|
|
87
|
+
|
|
88
|
+
<html>
|
|
89
|
+
<head>
|
|
90
|
+
<html>
|
|
91
|
+
<link>
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
Name: Link inside html inside head
|
|
95
|
+
|
|
96
|
+
<head>
|
|
97
|
+
<html>
|
|
98
|
+
<link>
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
Name: link inside body inside head inside html
|
|
102
|
+
|
|
103
|
+
<html>
|
|
104
|
+
<head>
|
|
105
|
+
<body>
|
|
106
|
+
<link>
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
Name: Link inside head inside head inside html
|
|
110
|
+
|
|
111
|
+
<html>
|
|
112
|
+
<head>
|
|
113
|
+
<head>
|
|
114
|
+
<link>
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
Name: Link inside script inside head inside html
|
|
118
|
+
|
|
119
|
+
<html>
|
|
120
|
+
<head>
|
|
121
|
+
<script>
|
|
122
|
+
<link>
|
|
123
|
+
</script>
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
Name: Link inside comment inside head inside html
|
|
127
|
+
|
|
128
|
+
<html>
|
|
129
|
+
<head/>
|
|
130
|
+
<link>
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
Name: Link inside of head after short head
|
|
134
|
+
|
|
135
|
+
<html>
|
|
136
|
+
<head/>
|
|
137
|
+
<head>
|
|
138
|
+
<link>
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
Name: Plain vanilla
|
|
142
|
+
Link:
|
|
143
|
+
|
|
144
|
+
<html>
|
|
145
|
+
<head>
|
|
146
|
+
<link>
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
Name: Ignore tags in the <script:... > namespace
|
|
150
|
+
Link*:
|
|
151
|
+
|
|
152
|
+
<html>
|
|
153
|
+
<head>
|
|
154
|
+
<script:paddypan>
|
|
155
|
+
<link>
|
|
156
|
+
</script:paddypan>
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
Name: Short link tag
|
|
160
|
+
Link:
|
|
161
|
+
|
|
162
|
+
<html>
|
|
163
|
+
<head>
|
|
164
|
+
<link/>
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
Name: Spaces in the HTML tag
|
|
168
|
+
Link:
|
|
169
|
+
|
|
170
|
+
<html >
|
|
171
|
+
<head>
|
|
172
|
+
<link>
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
Name: Spaces in the head tag
|
|
176
|
+
Link:
|
|
177
|
+
|
|
178
|
+
<html>
|
|
179
|
+
<head >
|
|
180
|
+
<link>
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
Name: Spaces in the link tag
|
|
184
|
+
Link:
|
|
185
|
+
|
|
186
|
+
<html>
|
|
187
|
+
<head>
|
|
188
|
+
<link >
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
Name: No whitespace
|
|
192
|
+
Link:
|
|
193
|
+
|
|
194
|
+
<html><head><link>
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
Name: Closed head tag
|
|
198
|
+
Link:
|
|
199
|
+
|
|
200
|
+
<html>
|
|
201
|
+
<head>
|
|
202
|
+
<link>
|
|
203
|
+
</head>
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
Name: One good, one bad (after close head)
|
|
207
|
+
Link:
|
|
208
|
+
|
|
209
|
+
<html>
|
|
210
|
+
<head>
|
|
211
|
+
<link>
|
|
212
|
+
</head>
|
|
213
|
+
<link>
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
Name: One good, one bad (after open body)
|
|
217
|
+
Link:
|
|
218
|
+
|
|
219
|
+
<html>
|
|
220
|
+
<head>
|
|
221
|
+
<link>
|
|
222
|
+
<body>
|
|
223
|
+
<link>
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
Name: ill formed (missing close head)
|
|
227
|
+
Link:
|
|
228
|
+
|
|
229
|
+
<html>
|
|
230
|
+
<head>
|
|
231
|
+
<link>
|
|
232
|
+
</html>
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
Name: Ill formed (no close head, link after </html>)
|
|
236
|
+
Link:
|
|
237
|
+
|
|
238
|
+
<html>
|
|
239
|
+
<head>
|
|
240
|
+
<link>
|
|
241
|
+
</html>
|
|
242
|
+
<link>
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
Name: Ignore random tags inside of html
|
|
246
|
+
Link:
|
|
247
|
+
|
|
248
|
+
<html>
|
|
249
|
+
<delicata>
|
|
250
|
+
<head>
|
|
251
|
+
<title>
|
|
252
|
+
<link>
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
Name: case-folding
|
|
256
|
+
Link*:
|
|
257
|
+
|
|
258
|
+
<HtMl>
|
|
259
|
+
<hEaD>
|
|
260
|
+
<LiNk>
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
Name: unexpected tags
|
|
264
|
+
Link:
|
|
265
|
+
|
|
266
|
+
<butternut>
|
|
267
|
+
<html>
|
|
268
|
+
<summer>
|
|
269
|
+
<head>
|
|
270
|
+
<turban>
|
|
271
|
+
<link>
|
|
272
|
+
|
|
273
|
+
|
|
274
|
+
Name: un-closed script tags
|
|
275
|
+
Link*:
|
|
276
|
+
|
|
277
|
+
<html>
|
|
278
|
+
<head>
|
|
279
|
+
<script>
|
|
280
|
+
<link>
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
Name: un-closed script tags (no whitespace)
|
|
284
|
+
Link*:
|
|
285
|
+
|
|
286
|
+
<html><head><script><link>
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
Name: un-closed comment
|
|
290
|
+
Link*:
|
|
291
|
+
|
|
292
|
+
<html>
|
|
293
|
+
<head>
|
|
294
|
+
<!--
|
|
295
|
+
<link>
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
Name: un-closed CDATA
|
|
299
|
+
Link*:
|
|
300
|
+
|
|
301
|
+
<html>
|
|
302
|
+
<head>
|
|
303
|
+
<![CDATA[
|
|
304
|
+
<link>
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
Name: cdata-like
|
|
308
|
+
Link*:
|
|
309
|
+
|
|
310
|
+
<html>
|
|
311
|
+
<head>
|
|
312
|
+
<![ACORN[
|
|
313
|
+
<link>
|
|
314
|
+
]]>
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
Name: comment close only
|
|
318
|
+
Link:
|
|
319
|
+
|
|
320
|
+
<html>
|
|
321
|
+
<head>
|
|
322
|
+
<link>
|
|
323
|
+
-->
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
Name: Vanilla, two links
|
|
327
|
+
Link:
|
|
328
|
+
Link:
|
|
329
|
+
|
|
330
|
+
<html>
|
|
331
|
+
<head>
|
|
332
|
+
<link>
|
|
333
|
+
<link>
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
Name: extra tag, two links
|
|
337
|
+
Link:
|
|
338
|
+
Link:
|
|
339
|
+
|
|
340
|
+
<html>
|
|
341
|
+
<gold nugget>
|
|
342
|
+
<head>
|
|
343
|
+
<link>
|
|
344
|
+
<link>
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
Name: case-fold, body ends, two links
|
|
348
|
+
Link:
|
|
349
|
+
Link*:
|
|
350
|
+
|
|
351
|
+
<html>
|
|
352
|
+
<head>
|
|
353
|
+
<link>
|
|
354
|
+
<LiNk>
|
|
355
|
+
<body>
|
|
356
|
+
<link>
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
Name: simple, non-quoted rel
|
|
360
|
+
Link: rel=openid.server
|
|
361
|
+
|
|
362
|
+
<html><head><link rel=openid.server>
|
|
363
|
+
|
|
364
|
+
|
|
365
|
+
Name: short tag has rel
|
|
366
|
+
Link: rel=openid.server
|
|
367
|
+
|
|
368
|
+
<html><head><link rel=openid.server/>
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
Name: short tag w/space has rel
|
|
372
|
+
Link: rel=openid.server
|
|
373
|
+
|
|
374
|
+
<html><head><link rel=openid.server />
|
|
375
|
+
|
|
376
|
+
|
|
377
|
+
Name: extra non-attribute, has rel
|
|
378
|
+
Link: rel=openid.server hubbard*=hubbard
|
|
379
|
+
|
|
380
|
+
<html><head><link hubbard rel=openid.server>
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
Name: non-attr, has rel, short
|
|
384
|
+
Link: rel=openid.server hubbard*=hubbard
|
|
385
|
+
|
|
386
|
+
<html><head><link hubbard rel=openid.server/>
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
Name: non-attr, has rel, short, space
|
|
390
|
+
Link: rel=openid.server hubbard*=hubbard
|
|
391
|
+
|
|
392
|
+
<html><head><link hubbard rel=openid.server />
|
|
393
|
+
|
|
394
|
+
|
|
395
|
+
Name: misplaced slash has rel
|
|
396
|
+
Link: rel=openid.server
|
|
397
|
+
|
|
398
|
+
<html><head><link / rel=openid.server>
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
Name: quoted rel
|
|
402
|
+
Link: rel=openid.server
|
|
403
|
+
|
|
404
|
+
<html><head><link rel="openid.server">
|
|
405
|
+
|
|
406
|
+
|
|
407
|
+
Name: single-quoted rel
|
|
408
|
+
Link: rel=openid.server
|
|
409
|
+
|
|
410
|
+
<html><head><link rel='openid.server'>
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
Name: two links w/ rel
|
|
414
|
+
Link: x=y
|
|
415
|
+
Link: a=b
|
|
416
|
+
|
|
417
|
+
<html><head><link x=y><link a=b>
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
Name: non-entity
|
|
421
|
+
Link: x=&y
|
|
422
|
+
|
|
423
|
+
<html><head><link x=&y>
|
|
424
|
+
|
|
425
|
+
|
|
426
|
+
Name: quoted non-entity
|
|
427
|
+
Link: x=&y
|
|
428
|
+
|
|
429
|
+
<html><head><link x="&y">
|
|
430
|
+
|
|
431
|
+
|
|
432
|
+
Name: quoted entity
|
|
433
|
+
Link: x=&
|
|
434
|
+
|
|
435
|
+
<html><head><link x="&">
|
|
436
|
+
|
|
437
|
+
|
|
438
|
+
Name: entity not processed
|
|
439
|
+
Link: x=
|
|
440
|
+
|
|
441
|
+
<html><head><link x="">
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
Name: <
|
|
445
|
+
Link: x=<
|
|
446
|
+
|
|
447
|
+
<html><head><link x="<">
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
Name: >
|
|
451
|
+
Link: x=>
|
|
452
|
+
|
|
453
|
+
<html><head><link x=">">
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
Name: "
|
|
457
|
+
Link: x="
|
|
458
|
+
|
|
459
|
+
<html><head><link x=""">
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
Name: &"
|
|
463
|
+
Link: x=&"
|
|
464
|
+
|
|
465
|
+
<html><head><link x="&"">
|
|
466
|
+
|
|
467
|
+
|
|
468
|
+
Name: mixed entity and non-entity
|
|
469
|
+
Link: x=&"…>
|
|
470
|
+
|
|
471
|
+
<html><head><link x="&"…>">
|
|
472
|
+
|
|
473
|
+
|
|
474
|
+
Name: mixed entity and non-entity (w/normal chars)
|
|
475
|
+
Link: x=x&"…>x
|
|
476
|
+
|
|
477
|
+
<html><head><link x="x&"…>x">
|
|
478
|
+
|
|
479
|
+
|
|
480
|
+
Name: broken tags
|
|
481
|
+
Link*: x=y
|
|
482
|
+
Link*: x=y<
|
|
483
|
+
|
|
484
|
+
<html><head><link x=y<>
|
|
485
|
+
|
|
486
|
+
|
|
487
|
+
Name: missing close pointy
|
|
488
|
+
Link*: x=y
|
|
489
|
+
Link*: x=y<link z=y
|
|
490
|
+
Link*: z=y
|
|
491
|
+
|
|
492
|
+
<html><head><link x=y<link z=y />
|
|
493
|
+
|
|
494
|
+
|
|
495
|
+
Name: missing attribute value
|
|
496
|
+
Link: x=y y*=y
|
|
497
|
+
Link: x=y
|
|
498
|
+
|
|
499
|
+
<html><head><link x=y y=><link x=y />
|
|
500
|
+
|
|
501
|
+
|
|
502
|
+
Name: Missing close pointy (no following)
|
|
503
|
+
Link*: x=y
|
|
504
|
+
|
|
505
|
+
<html><head><link x=y
|
|
506
|
+
|
|
507
|
+
|
|
508
|
+
Name: Should be quoted
|
|
509
|
+
Link*: x=<
|
|
510
|
+
|
|
511
|
+
<html><head><link x="<">
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
Name: Should be quoted (2)
|
|
515
|
+
Link*: x=>
|
|
516
|
+
Link*: x=x
|
|
517
|
+
|
|
518
|
+
<html><head><link x=">">
|
|
519
|
+
|
|
520
|
+
|
|
521
|
+
Name: Repeated attribute
|
|
522
|
+
Link: x=y
|
|
523
|
+
|
|
524
|
+
<html><head><link x=z x=y>
|
|
525
|
+
|
|
526
|
+
|
|
527
|
+
Name: Repeated attribute (2)
|
|
528
|
+
Link: x=y
|
|
529
|
+
|
|
530
|
+
<html><head><link x=y x=y>
|
|
531
|
+
|
|
532
|
+
|
|
533
|
+
Name: Two attributes
|
|
534
|
+
Link: x=y y=z
|
|
535
|
+
|
|
536
|
+
<html><head><link x=y y=z>
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
Name: Well-formed link rel="openid.server"
|
|
540
|
+
Link: rel=openid.server href=http://www.myopenid.com/server
|
|
541
|
+
|
|
542
|
+
<html>
|
|
543
|
+
<head>
|
|
544
|
+
<link rel="openid.server"
|
|
545
|
+
href="http://www.myopenid.com/server" />
|
|
546
|
+
</head>
|
|
547
|
+
</html>
|
|
548
|
+
|
|
549
|
+
|
|
550
|
+
Name: Well-formed link rel="openid.server" and "openid.delegate"
|
|
551
|
+
Link: rel=openid.server href=http://www.myopenid.com/server
|
|
552
|
+
Link: rel=openid.delegate href=http://example.myopenid.com/
|
|
553
|
+
|
|
554
|
+
<html><head><link rel="openid.server"
|
|
555
|
+
href="http://www.myopenid.com/server" />
|
|
556
|
+
<link rel="openid.delegate" href="http://example.myopenid.com/" />
|
|
557
|
+
</head></html>
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
Name: from brian's livejournal page
|
|
561
|
+
Link: rel=stylesheet href=http://www.livejournal.com/~serotta/res/319998/stylesheet?1130478711 type=text/css
|
|
562
|
+
Link: rel=openid.server href=http://www.livejournal.com/openid/server.bml
|
|
563
|
+
|
|
564
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
565
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
566
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
567
|
+
<head>
|
|
568
|
+
<link rel="stylesheet"
|
|
569
|
+
href="http://www.livejournal.com/~serotta/res/319998/stylesheet?1130478711"
|
|
570
|
+
type="text/css" />
|
|
571
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
572
|
+
<meta name="foaf:maker"
|
|
573
|
+
content="foaf:mbox_sha1sum '12f8abdacb5b1a806711e23249da592c0d316260'" />
|
|
574
|
+
<meta name="robots" content="noindex, nofollow, noarchive" />
|
|
575
|
+
<meta name="googlebot" content="nosnippet" />
|
|
576
|
+
<link rel="openid.server"
|
|
577
|
+
href="http://www.livejournal.com/openid/server.bml" />
|
|
578
|
+
<title>Brian</title>
|
|
579
|
+
</head>
|
|
580
|
+
|
|
581
|
+
|
|
582
|
+
Name: non-ascii (Latin-1 or UTF8)
|
|
583
|
+
Link: x=®
|
|
584
|
+
|
|
585
|
+
<html><head><link x="®">
|
|
586
|
+
|
|
587
|
+
|