tilia-dav 3.1.0.pre.alpha4 → 3.1.0.pre.alpha5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +4 -4
  3. data/lib/tilia/dav/server.rb +1 -27
  4. data/lib/tilia/dav/version.rb +1 -1
  5. data/lib/tilia/dav_acl/plugin.rb +1 -1
  6. data/test/cal_dav/expand_events_double_events_test.rb +1 -1
  7. data/test/cal_dav/expand_events_dtstar_tand_dten_dby_day_test.rb +1 -1
  8. data/test/cal_dav/expand_events_dtstar_tand_dtend_test.rb +1 -1
  9. data/test/cal_dav/expand_events_floating_time_test.rb +1 -1
  10. data/test/cal_dav/free_busy_report_test.rb +3 -3
  11. data/test/cal_dav/ics_export_plugin_test.rb +16 -16
  12. data/test/cal_dav/issue203_test.rb +1 -1
  13. data/test/cal_dav/issue205_test.rb +1 -1
  14. data/test/cal_dav/issue211_test.rb +1 -1
  15. data/test/cal_dav/issue220_test.rb +1 -1
  16. data/test/cal_dav/issue228_test.rb +1 -1
  17. data/test/cal_dav/plugin_test.rb +1 -1
  18. data/test/cal_dav/schedule/free_busy_request_test.rb +1 -1
  19. data/test/cal_dav/schedule/outbox_post_test.rb +7 -7
  20. data/test/cal_dav/sharing_plugin_test.rb +13 -13
  21. data/test/cal_dav/validate_i_cal_test.rb +13 -13
  22. data/test/card_dav/address_book_query_test.rb +4 -4
  23. data/test/card_dav/multi_get_test.rb +2 -2
  24. data/test/card_dav/validate_v_card_test.rb +5 -5
  25. data/test/card_dav/vcf_export_test.rb +1 -1
  26. data/test/dav/auth/backend/abstract_digest_test.rb +1 -1
  27. data/test/dav/browser/map_get_to_prop_find_test.rb +1 -1
  28. data/test/dav/browser/plugin_test.rb +1 -1
  29. data/test/dav/get_if_conditions_test.rb +3 -3
  30. data/test/dav/http_prefer_parsing_test.rb +1 -1
  31. data/test/dav/issue33_test.rb +2 -2
  32. data/test/dav/locks/ms_word_test.rb +3 -3
  33. data/test/dav/locks/plugin_test.rb +24 -24
  34. data/test/dav/mount/plugin_test.rb +2 -2
  35. data/test/dav/partial_update/plugin_test.rb +1 -1
  36. data/test/dav/server_copy_move_test.rb +7 -7
  37. data/test/dav/server_events_test.rb +3 -3
  38. data/test/dav/server_mkcol_test.rb +12 -12
  39. data/test/dav/server_plugin_test.rb +1 -1
  40. data/test/dav/server_precondition_test.rb +7 -7
  41. data/test/dav/server_range_test.rb +9 -9
  42. data/test/dav/server_simple_test.rb +27 -24
  43. data/test/dav/sync/plugin_test.rb +12 -12
  44. data/test/dav/xml/property/supported_report_set_test.rb +1 -1
  45. data/test/dav_acl/expand_properties_test.rb +4 -4
  46. data/test/dav_acl/plugin_admin_test.rb +2 -2
  47. data/test/dav_acl/principal_property_search_test.rb +6 -6
  48. data/test/dav_acl/principal_search_property_set_test.rb +3 -3
  49. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 36d340816a386a03d2fd0d379aad4645f3ee7dab
4
- data.tar.gz: f0e62916517751349ab5d671cb1cf36f504212c0
3
+ metadata.gz: 83b1a20d46994621884725694c12b5fdbc7ec33f
4
+ data.tar.gz: 704f6263f83c60f06fc6e3f69d838ebf9014b043
5
5
  SHA512:
6
- metadata.gz: c03c8b130a67c9eb7d12af88058624ef60ab6ca85b8e8fc7ff67c7f20374a0623f073e740dcd311ff6bac95e50906de411d03512d838c6528d5665cc7922c895
7
- data.tar.gz: 9509b9b79230dbe5c8ae0ea9d81752b78dd4ab4475fc62868998d33fdff8cc07b5a89b94e9e1c26ef3fae25d4df61a7be9671d7f62979e6554f1443620ccaa0f
6
+ metadata.gz: 37bd4d2be7e4c2dd6a6a75a7ad7d65e703422592d621cbe674dcf150ae25f3e24a82727b9e3b939d135dc97b67c10fa752b18bb99dfa8591fc678a8a2f839e1e
7
+ data.tar.gz: d7e766ac87d7244e28c6c287bbde68da6a7eea1088365bf99e4fc395d1932de65c158a1be9ceaceb2d292cc8b7fc7a10ccad7bd441bd213cec9d4e5da556656c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  GEM
2
2
  remote: https://rubygems.org/
3
3
  specs:
4
- activesupport (4.2.5)
4
+ activesupport (4.2.5.1)
5
5
  i18n (~> 0.7)
6
6
  json (~> 1.7, >= 1.7.7)
7
7
  minitest (~> 5.1)
@@ -12,7 +12,7 @@ GEM
12
12
  parser (~> 2.2)
13
13
  chronic (0.10.2)
14
14
  docile (1.1.5)
15
- ethon (0.8.0)
15
+ ethon (0.8.1)
16
16
  ffi (>= 1.3.0)
17
17
  ffi (1.9.10)
18
18
  i18n (0.7.0)
@@ -21,7 +21,7 @@ GEM
21
21
  mail (2.6.3)
22
22
  mime-types (>= 1.16, < 3)
23
23
  mime-types (2.99)
24
- minitest (5.8.3)
24
+ minitest (5.8.4)
25
25
  mysql2 (0.4.2)
26
26
  parser (2.2.3.0)
27
27
  ast (>= 1.1, < 3.0)
@@ -50,7 +50,7 @@ GEM
50
50
  thread_safe (0.3.5)
51
51
  tilia-event (2.0.2)
52
52
  activesupport (~> 4.2)
53
- tilia-http (4.1.0.5)
53
+ tilia-http (4.1.0.6)
54
54
  activesupport (~> 4.2)
55
55
  rack (~> 1.6)
56
56
  rchardet (~> 1.6)
@@ -273,33 +273,7 @@ module Tilia
273
273
  #
274
274
  # @return string
275
275
  def guess_base_uri
276
- path_info = @http_request.raw_server_value('PATH_INFO') || ''
277
- uri = @http_request.raw_server_value('REQUEST_PATH') || ''
278
-
279
- # If PATH_INFO is found, we can assume it's accurate.
280
- unless path_info.blank?
281
- # We need to make sure we ignore the QUERY_STRING part
282
- pos = uri.index('?')
283
- uri = uri[0...pos] if pos
284
-
285
- # PATH_INFO is only set for urls, such as: /example.php/path
286
- # in that case PATH_INFO contains '/path'.
287
- # Note that REQUEST_URI is percent encoded, while PATH_INFO is
288
- # not, Therefore they are only comparable if we first decode
289
- # REQUEST_INFO as well.
290
- decoded_uri = Http::UrlUtil.decode_path(uri)
291
-
292
- # A simple sanity check:
293
- if decoded_uri[(decoded_uri.length - path_info.length)..-1] == path_info
294
- base_uri = decoded_uri[0, decoded_uri.length - path_info.length]
295
- return base_uri.gsub(%r{/+$}, '') + '/'
296
- end
297
-
298
- fail Exception, "The REQUEST_URI (#{uri}) did not end with the contents of PATH_INFO (#{path_info}). This server might be misconfigured."
299
- end
300
-
301
- # The last fallback is that we're just going to assume the server root.
302
- '/'
276
+ "#{@http_request.raw_server_value('SCRIPT_NAME')}/"
303
277
  end
304
278
 
305
279
  # Adds a plugin to the server
@@ -3,7 +3,7 @@ module Tilia
3
3
  # This class contains the SabreDAV version constants.
4
4
  class Version
5
5
  # Full version number
6
- VERSION = '3.1.0-alpha4'
6
+ VERSION = '3.1.0-alpha5'
7
7
  end
8
8
  end
9
9
  end
@@ -761,7 +761,7 @@ module Tilia
761
761
  if node.is_a?(IAcl)
762
762
  prop_find.handle(
763
763
  '{DAV:}owner',
764
- -> { Dav::Xml::Property::Href.new(node.owner + '/') }
764
+ -> { Dav::Xml::Property::Href.new("#{node.owner}/") }
765
765
  )
766
766
  end
767
767
  end
@@ -50,7 +50,7 @@ VCF
50
50
  request = Http::Sapi.create_from_server_array(
51
51
  'REQUEST_METHOD' => 'REPORT',
52
52
  'HTTP_CONTENT_TYPE' => 'application/xml',
53
- 'REQUEST_PATH' => '/calendars/user1/calendar1',
53
+ 'PATH_INFO' => '/calendars/user1/calendar1',
54
54
  'HTTP_DEPTH' => '1'
55
55
  )
56
56
 
@@ -39,7 +39,7 @@ VCF
39
39
  request = Http::Sapi.create_from_server_array(
40
40
  'REQUEST_METHOD' => 'REPORT',
41
41
  'HTTP_CONTENT_TYPE' => 'application/xml',
42
- 'REQUEST_PATH' => '/calendars/user1/calendar1',
42
+ 'PATH_INFO' => '/calendars/user1/calendar1',
43
43
  'HTTP_DEPTH' => '1'
44
44
  )
45
45
 
@@ -47,7 +47,7 @@ VCF
47
47
  request = Http::Sapi.create_from_server_array(
48
48
  'REQUEST_METHOD' => 'REPORT',
49
49
  'HTTP_CONTENT_TYPE' => 'application/xml',
50
- 'REQUEST_PATH' => '/calendars/user1/calendar1',
50
+ 'PATH_INFO' => '/calendars/user1/calendar1',
51
51
  'HTTP_DEPTH' => '1'
52
52
  )
53
53
 
@@ -172,7 +172,7 @@ XML
172
172
  request = Http::Sapi.create_from_server_array(
173
173
  'REQUEST_METHOD' => 'GET',
174
174
  'HTTP_CONTENT_TYPE' => 'application/xml',
175
- 'REQUEST_PATH' => '/calendars/user1/calendar1',
175
+ 'PATH_INFO' => '/calendars/user1/calendar1',
176
176
  'HTTP_DEPTH' => '1',
177
177
  'QUERY_STRING' => 'export&start=1&end=2000000000&expand=1'
178
178
  )
@@ -67,7 +67,7 @@ ics
67
67
  @server = Dav::ServerMock.new([calendar])
68
68
 
69
69
  request = Http::Sapi.create_from_server_array(
70
- 'REQUEST_PATH' => '/calendar'
70
+ 'PATH_INFO' => '/calendar'
71
71
  )
72
72
  @server.http_request = request
73
73
  @server.http_response = Http::ResponseMock.new
@@ -110,7 +110,7 @@ XML
110
110
 
111
111
  def test_free_busy_report_wrong_node
112
112
  request = Http::Sapi.create_from_server_array(
113
- 'REQUEST_PATH' => '/'
113
+ 'PATH_INFO' => '/'
114
114
  )
115
115
  @server.http_request = request
116
116
 
@@ -134,7 +134,7 @@ XML
134
134
  @server.add_plugin(@plugin)
135
135
 
136
136
  request = Http::Sapi.create_from_server_array(
137
- 'REQUEST_PATH' => '/'
137
+ 'PATH_INFO' => '/'
138
138
  )
139
139
  @server.http_request = request
140
140
 
@@ -31,7 +31,7 @@ module Tilia
31
31
  server.add_plugin(Plugin.new)
32
32
 
33
33
  h = Http::Sapi.create_from_server_array(
34
- 'REQUEST_PATH' => '/UUID-123467',
34
+ 'PATH_INFO' => '/UUID-123467',
35
35
  'REQUEST_METHOD' => 'GET',
36
36
  'QUERY_STRING' => 'export'
37
37
  )
@@ -82,7 +82,7 @@ module Tilia
82
82
  server.add_plugin(Plugin.new)
83
83
 
84
84
  h = Http::Sapi.create_from_server_array(
85
- 'REQUEST_PATH' => '/UUID-123467',
85
+ 'PATH_INFO' => '/UUID-123467',
86
86
  'REQUEST_METHOD' => 'GET',
87
87
  'QUERY_STRING' => 'export'
88
88
  )
@@ -120,7 +120,7 @@ module Tilia
120
120
  server.add_plugin(plugin)
121
121
 
122
122
  h = Http::Sapi.create_from_server_array(
123
- 'REQUEST_PATH' => '/UUID-123467',
123
+ 'PATH_INFO' => '/UUID-123467',
124
124
  'REQUEST_METHOD' => 'GET'
125
125
  )
126
126
  assert(plugin.http_get(h, server.http_response))
@@ -146,7 +146,7 @@ module Tilia
146
146
  server.add_plugin(DavAcl::Plugin.new)
147
147
 
148
148
  h = Http::Sapi.create_from_server_array(
149
- 'REQUEST_PATH' => '/UUID-123467',
149
+ 'PATH_INFO' => '/UUID-123467',
150
150
  'QUERY_STRING' => 'export'
151
151
  )
152
152
 
@@ -188,7 +188,7 @@ module Tilia
188
188
  server.plugin('acl').admin_principals = ['principals/admin']
189
189
 
190
190
  h = Http::Sapi.create_from_server_array(
191
- 'REQUEST_PATH' => '/UUID-123467',
191
+ 'PATH_INFO' => '/UUID-123467',
192
192
  'REQUEST_METHOD' => 'GET',
193
193
  'QUERY_STRING' => 'export'
194
194
  )
@@ -239,7 +239,7 @@ module Tilia
239
239
  server.add_plugin(Plugin.new)
240
240
 
241
241
  h = Http::Sapi.create_from_server_array(
242
- 'REQUEST_PATH' => '/UUID-123467',
242
+ 'PATH_INFO' => '/UUID-123467',
243
243
  'REQUEST_METHOD' => 'GET',
244
244
  'QUERY_STRING' => 'export&start=foo'
245
245
  )
@@ -274,7 +274,7 @@ module Tilia
274
274
  server.add_plugin(Plugin.new)
275
275
 
276
276
  h = Http::Sapi.create_from_server_array(
277
- 'REQUEST_PATH' => '/UUID-123467',
277
+ 'PATH_INFO' => '/UUID-123467',
278
278
  'REQUEST_METHOD' => 'GET',
279
279
  'QUERY_STRING' => 'export&end=foo'
280
280
  )
@@ -309,7 +309,7 @@ module Tilia
309
309
  server.add_plugin(Plugin.new)
310
310
 
311
311
  h = Http::Sapi.create_from_server_array(
312
- 'REQUEST_PATH' => '/UUID-123467',
312
+ 'PATH_INFO' => '/UUID-123467',
313
313
  'REQUEST_METHOD' => 'GET',
314
314
  'QUERY_STRING' => 'export&start=1&end=2'
315
315
  )
@@ -348,7 +348,7 @@ module Tilia
348
348
  server.add_plugin(Plugin.new)
349
349
 
350
350
  h = Http::Sapi.create_from_server_array(
351
- 'REQUEST_PATH' => '/UUID-123467',
351
+ 'PATH_INFO' => '/UUID-123467',
352
352
  'REQUEST_METHOD' => 'GET',
353
353
  'QUERY_STRING' => 'export&expand=1&end=1'
354
354
  )
@@ -383,7 +383,7 @@ module Tilia
383
383
  server.add_plugin(Plugin.new)
384
384
 
385
385
  h = Http::Sapi.create_from_server_array(
386
- 'REQUEST_PATH' => '/UUID-123467',
386
+ 'PATH_INFO' => '/UUID-123467',
387
387
  'REQUEST_METHOD' => 'GET',
388
388
  'QUERY_STRING' => 'export&start=1&end=2000000000&expand=1'
389
389
  )
@@ -422,7 +422,7 @@ module Tilia
422
422
  server.add_plugin(Plugin.new)
423
423
 
424
424
  h = Http::Sapi.create_from_server_array(
425
- 'REQUEST_PATH' => '/UUID-123467',
425
+ 'PATH_INFO' => '/UUID-123467',
426
426
  'REQUEST_METHOD' => 'GET',
427
427
  'HTTP_ACCEPT' => 'application/calendar+json',
428
428
  'QUERY_STRING' => 'export'
@@ -459,7 +459,7 @@ module Tilia
459
459
  server.add_plugin(Plugin.new)
460
460
 
461
461
  h = Http::Sapi.create_from_server_array(
462
- 'REQUEST_PATH' => '/UUID-123467',
462
+ 'PATH_INFO' => '/UUID-123467',
463
463
  'REQUEST_METHOD' => 'GET',
464
464
  'QUERY_STRING' => 'export&accept=jcal'
465
465
  )
@@ -495,7 +495,7 @@ module Tilia
495
495
  server.add_plugin(Plugin.new)
496
496
 
497
497
  h = Http::Sapi.create_from_server_array(
498
- 'REQUEST_PATH' => '/UUID-123467',
498
+ 'PATH_INFO' => '/UUID-123467',
499
499
  'REQUEST_METHOD' => 'GET',
500
500
  'HTTP_ACCEPT' => 'text/plain',
501
501
  'QUERY_STRING' => 'export'
@@ -535,7 +535,7 @@ module Tilia
535
535
  server.add_plugin(Plugin.new)
536
536
 
537
537
  h = Http::Sapi.create_from_server_array(
538
- 'REQUEST_PATH' => '/UUID-123467',
538
+ 'PATH_INFO' => '/UUID-123467',
539
539
  'REQUEST_METHOD' => 'GET',
540
540
  'QUERY_STRING' => 'export&componentType=VEVENT'
541
541
  )
@@ -578,7 +578,7 @@ module Tilia
578
578
  server.add_plugin(Plugin.new)
579
579
 
580
580
  h = Http::Sapi.create_from_server_array(
581
- 'REQUEST_PATH' => '/UUID-123467',
581
+ 'PATH_INFO' => '/UUID-123467',
582
582
  'REQUEST_METHOD' => 'GET',
583
583
  'QUERY_STRING' => 'export&componentType=VTODO'
584
584
  )
@@ -621,7 +621,7 @@ module Tilia
621
621
  server.add_plugin(Plugin.new)
622
622
 
623
623
  h = Http::Sapi.create_from_server_array(
624
- 'REQUEST_PATH' => '/UUID-123467',
624
+ 'PATH_INFO' => '/UUID-123467',
625
625
  'REQUEST_METHOD' => 'GET',
626
626
  'QUERY_STRING' => 'export&componentType=VVOODOO'
627
627
  )
@@ -52,7 +52,7 @@ VCF
52
52
  request = Http::Sapi.create_from_server_array(
53
53
  'REQUEST_METHOD' => 'REPORT',
54
54
  'HTTP_CONTENT_TYPE' => 'application/xml',
55
- 'REQUEST_PATH' => '/calendars/user1/calendar1',
55
+ 'PATH_INFO' => '/calendars/user1/calendar1',
56
56
  'HTTP_DEPTH' => '1'
57
57
  )
58
58
 
@@ -45,7 +45,7 @@ VCF
45
45
  request = Http::Sapi.create_from_server_array(
46
46
  'REQUEST_METHOD' => 'REPORT',
47
47
  'HTTP_CONTENT_TYPE' => 'application/xml',
48
- 'REQUEST_PATH' => '/calendars/user1/calendar1',
48
+ 'PATH_INFO' => '/calendars/user1/calendar1',
49
49
  'HTTP_DEPTH' => '1'
50
50
  )
51
51
 
@@ -50,7 +50,7 @@ VCF
50
50
  request = Http::Sapi.create_from_server_array(
51
51
  'REQUEST_METHOD' => 'REPORT',
52
52
  'HTTP_CONTENT_TYPE' => 'application/xml',
53
- 'REQUEST_PATH' => '/calendars/user1/calendar1',
53
+ 'PATH_INFO' => '/calendars/user1/calendar1',
54
54
  'HTTP_DEPTH' => '1'
55
55
  )
56
56
 
@@ -60,7 +60,7 @@ VCF
60
60
  request = Http::Sapi.create_from_server_array(
61
61
  'REQUEST_METHOD' => 'REPORT',
62
62
  'HTTP_CONTENT_TYPE' => 'application/xml',
63
- 'REQUEST_PATH' => '/calendars/user1/calendar1',
63
+ 'PATH_INFO' => '/calendars/user1/calendar1',
64
64
  'HTTP_DEPTH' => '1'
65
65
  )
66
66
 
@@ -40,7 +40,7 @@ VCF
40
40
  request = Http::Sapi.create_from_server_array(
41
41
  'REQUEST_METHOD' => 'REPORT',
42
42
  'HTTP_CONTENT_TYPE' => 'application/xml',
43
- 'REQUEST_PATH' => '/calendars/user1/calendar1',
43
+ 'PATH_INFO' => '/calendars/user1/calendar1',
44
44
  'HTTP_DEPTH' => '1'
45
45
  )
46
46
 
@@ -212,7 +212,7 @@ XML
212
212
  def test_mk_calendar_existing_calendar
213
213
  request = Http::Sapi.create_from_server_array(
214
214
  'REQUEST_METHOD' => 'MKCALENDAR',
215
- 'REQUEST_PATH' => '/calendars/user1/UUID-123467'
215
+ 'PATH_INFO' => '/calendars/user1/UUID-123467'
216
216
  )
217
217
 
218
218
  body = <<XML
@@ -522,7 +522,7 @@ ICS
522
522
  @server.http_request = Http::Sapi.create_from_server_array(
523
523
  'CONTENT_TYPE' => 'text/calendar',
524
524
  'REQUEST_METHOD' => 'POST',
525
- 'REQUEST_PATH' => '/calendars/user1/outbox'
525
+ 'PATH_INFO' => '/calendars/user1/outbox'
526
526
  )
527
527
 
528
528
  body = <<ICS
@@ -16,7 +16,7 @@ module Tilia
16
16
  def test_post_pass_thru_not_found
17
17
  req = Http::Sapi.create_from_server_array(
18
18
  'REQUEST_METHOD' => 'POST',
19
- 'REQUEST_PATH' => '/notfound',
19
+ 'PATH_INFO' => '/notfound',
20
20
  'HTTP_CONTENT_TYPE' => 'text/calendar'
21
21
  )
22
22
 
@@ -26,7 +26,7 @@ module Tilia
26
26
  def test_post_pass_thru_not_text_calendar
27
27
  req = Http::Sapi.create_from_server_array(
28
28
  'REQUEST_METHOD' => 'POST',
29
- 'REQUEST_PATH' => '/calendars/user1/outbox'
29
+ 'PATH_INFO' => '/calendars/user1/outbox'
30
30
  )
31
31
 
32
32
  assert_http_status(501, req)
@@ -35,7 +35,7 @@ module Tilia
35
35
  def test_post_pass_thru_no_out_box
36
36
  req = Http::Sapi.create_from_server_array(
37
37
  'REQUEST_METHOD' => 'POST',
38
- 'REQUEST_PATH' => '/calendars',
38
+ 'PATH_INFO' => '/calendars',
39
39
  'HTTP_CONTENT_TYPE' => 'text/calendar'
40
40
  )
41
41
 
@@ -45,7 +45,7 @@ module Tilia
45
45
  def test_invalid_ical_body
46
46
  req = Http::Sapi.create_from_server_array(
47
47
  'REQUEST_METHOD' => 'POST',
48
- 'REQUEST_PATH' => '/calendars/user1/outbox',
48
+ 'PATH_INFO' => '/calendars/user1/outbox',
49
49
  'HTTP_ORIGINATOR' => 'mailto:user1.sabredav@sabredav.org',
50
50
  'HTTP_RECIPIENT' => 'mailto:user2@example.org',
51
51
  'HTTP_CONTENT_TYPE' => 'text/calendar'
@@ -58,7 +58,7 @@ module Tilia
58
58
  def test_no_vevent
59
59
  req = Http::Sapi.create_from_server_array(
60
60
  'REQUEST_METHOD' => 'POST',
61
- 'REQUEST_PATH' => '/calendars/user1/outbox',
61
+ 'PATH_INFO' => '/calendars/user1/outbox',
62
62
  'HTTP_ORIGINATOR' => 'mailto:user1.sabredav@sabredav.org',
63
63
  'HTTP_RECIPIENT' => 'mailto:user2@example.org',
64
64
  'HTTP_CONTENT_TYPE' => 'text/calendar'
@@ -79,7 +79,7 @@ ICS
79
79
  def test_no_method
80
80
  req = Http::Sapi.create_from_server_array(
81
81
  'REQUEST_METHOD' => 'POST',
82
- 'REQUEST_PATH' => '/calendars/user1/outbox',
82
+ 'PATH_INFO' => '/calendars/user1/outbox',
83
83
  'HTTP_ORIGINATOR' => 'mailto:user1.sabredav@sabredav.org',
84
84
  'HTTP_RECIPIENT' => 'mailto:user2@example.org',
85
85
  'HTTP_CONTENT_TYPE' => 'text/calendar'
@@ -100,7 +100,7 @@ ICS
100
100
  def test_unsupported_method
101
101
  req = Http::Sapi.create_from_server_array(
102
102
  'REQUEST_METHOD' => 'POST',
103
- 'REQUEST_PATH' => '/calendars/user1/outbox',
103
+ 'PATH_INFO' => '/calendars/user1/outbox',
104
104
  'HTTP_ORIGINATOR' => 'mailto:user1.sabredav@sabredav.org',
105
105
  'HTTP_RECIPIENT' => 'mailto:user2@example.org',
106
106
  'HTTP_CONTENT_TYPE' => 'text/calendar'
@@ -116,7 +116,7 @@ module Tilia
116
116
  def test_unknown_method_no_post
117
117
  request = Http::Sapi.create_from_server_array(
118
118
  'REQUEST_METHOD' => 'PATCH',
119
- 'REQUEST_PATH' => '/'
119
+ 'PATH_INFO' => '/'
120
120
  )
121
121
 
122
122
  response = request(request)
@@ -127,7 +127,7 @@ module Tilia
127
127
  def test_unknown_method_no_xml
128
128
  request = Http::Sapi.create_from_server_array(
129
129
  'REQUEST_METHOD' => 'POST',
130
- 'REQUEST_PATH' => '/',
130
+ 'PATH_INFO' => '/',
131
131
  'CONTENT_TYPE' => 'text/plain'
132
132
  )
133
133
 
@@ -139,7 +139,7 @@ module Tilia
139
139
  def test_unknown_method_no_node
140
140
  request = Http::Sapi.create_from_server_array(
141
141
  'REQUEST_METHOD' => 'POST',
142
- 'REQUEST_PATH' => '/foo',
142
+ 'PATH_INFO' => '/foo',
143
143
  'CONTENT_TYPE' => 'text/xml'
144
144
  )
145
145
 
@@ -151,7 +151,7 @@ module Tilia
151
151
  def test_share_request
152
152
  request = Http::Sapi.create_from_server_array(
153
153
  'REQUEST_METHOD' => 'POST',
154
- 'REQUEST_PATH' => '/calendars/user1/cal1',
154
+ 'PATH_INFO' => '/calendars/user1/cal1',
155
155
  'CONTENT_TYPE' => 'text/xml'
156
156
  )
157
157
 
@@ -195,7 +195,7 @@ RRR
195
195
  def test_share_request_no_shareable_calendar
196
196
  request = Http::Sapi.create_from_server_array(
197
197
  'REQUEST_METHOD' => 'POST',
198
- 'REQUEST_PATH' => '/calendars/user1/cal2',
198
+ 'PATH_INFO' => '/calendars/user1/cal2',
199
199
  'CONTENT_TYPE' => 'text/xml'
200
200
  )
201
201
 
@@ -222,7 +222,7 @@ XML
222
222
  def test_invite_reply
223
223
  request = Http::Sapi.create_from_server_array(
224
224
  'REQUEST_METHOD' => 'POST',
225
- 'REQUEST_PATH' => '/calendars/user1',
225
+ 'PATH_INFO' => '/calendars/user1',
226
226
  'CONTENT_TYPE' => 'text/xml'
227
227
  )
228
228
 
@@ -242,7 +242,7 @@ XML
242
242
  def test_invite_bad_xml
243
243
  request = Http::Sapi.create_from_server_array(
244
244
  'REQUEST_METHOD' => 'POST',
245
- 'REQUEST_PATH' => '/calendars/user1',
245
+ 'PATH_INFO' => '/calendars/user1',
246
246
  'CONTENT_TYPE' => 'text/xml'
247
247
  )
248
248
 
@@ -259,7 +259,7 @@ XML
259
259
  def test_invite_wrong_url
260
260
  request = Http::Sapi.create_from_server_array(
261
261
  'REQUEST_METHOD' => 'POST',
262
- 'REQUEST_PATH' => '/calendars/user1/cal1',
262
+ 'PATH_INFO' => '/calendars/user1/cal1',
263
263
  'CONTENT_TYPE' => 'text/xml'
264
264
  )
265
265
 
@@ -282,7 +282,7 @@ XML
282
282
  def test_publish
283
283
  request = Http::Sapi.create_from_server_array(
284
284
  'REQUEST_METHOD' => 'POST',
285
- 'REQUEST_PATH' => '/calendars/user1/cal1',
285
+ 'PATH_INFO' => '/calendars/user1/cal1',
286
286
  'CONTENT_TYPE' => 'text/xml'
287
287
  )
288
288
 
@@ -300,7 +300,7 @@ XML
300
300
  def test_unpublish
301
301
  request = Http::Sapi.create_from_server_array(
302
302
  'REQUEST_METHOD' => 'POST',
303
- 'REQUEST_PATH' => '/calendars/user1/cal1',
303
+ 'PATH_INFO' => '/calendars/user1/cal1',
304
304
  'CONTENT_TYPE' => 'text/xml'
305
305
  )
306
306
 
@@ -318,7 +318,7 @@ XML
318
318
  def test_publish_wrong_url
319
319
  request = Http::Sapi.create_from_server_array(
320
320
  'REQUEST_METHOD' => 'POST',
321
- 'REQUEST_PATH' => '/calendars/user1/cal2',
321
+ 'PATH_INFO' => '/calendars/user1/cal2',
322
322
  'CONTENT_TYPE' => 'text/xml'
323
323
  )
324
324
 
@@ -336,7 +336,7 @@ XML
336
336
  def test_unpublish_wrong_url
337
337
  request = Http::Sapi.create_from_server_array(
338
338
  'REQUEST_METHOD' => 'POST',
339
- 'REQUEST_PATH' => '/calendars/user1/cal2',
339
+ 'PATH_INFO' => '/calendars/user1/cal2',
340
340
  'CONTENT_TYPE' => 'text/xml'
341
341
  )
342
342
 
@@ -354,7 +354,7 @@ XML
354
354
  def test_unknown_xml_doc
355
355
  request = Http::Sapi.create_from_server_array(
356
356
  'REQUEST_METHOD' => 'POST',
357
- 'REQUEST_PATH' => '/calendars/user1/cal2',
357
+ 'PATH_INFO' => '/calendars/user1/cal2',
358
358
  'CONTENT_TYPE' => 'text/xml'
359
359
  )
360
360