diff --git a/lib/wsoc/app.rb b/lib/wsoc/app.rb index b95ff9f..0e7dc79 100644 --- a/lib/wsoc/app.rb +++ b/lib/wsoc/app.rb @@ -113,6 +113,12 @@ class App < Sinatra::Base course_pass '/course/redirects/307/pass.html' + get '/course/redirects/meta.html' do + course_page :course_redirects_meta + end + + course_pass '/course/redirects/meta/pass.html' + get '/course/cookies/start.html' do response.set_cookie 'auth_level', '1' diff --git a/lib/wsoc/course_specs.rb b/lib/wsoc/course_specs.rb index c397ebd..811bc10 100644 --- a/lib/wsoc/course_specs.rb +++ b/lib/wsoc/course_specs.rb @@ -125,6 +125,10 @@ module CourseSpecs 'should visit the 307 HTTP redirect test page' should_visit '/course/redirects/307/pass.html', 'should follow HTTP 307 redirects' + should_visit '/course/redirects/meta.html', + 'should visit the meta refresh redirect test page' + should_visit '/course/redirects/meta/pass.html', + 'should follow meta refresh (soft) redirects' config :auth_store, { '/course/auth/' => { diff --git a/views/course_redirects_meta.erb b/views/course_redirects_meta.erb new file mode 100644 index 0000000..bdd78a3 --- /dev/null +++ b/views/course_redirects_meta.erb @@ -0,0 +1,8 @@ + + + + + + Redirecting... + + diff --git a/views/course_redirects_start.erb b/views/course_redirects_start.erb index cbde7f1..596d0e3 100644 --- a/views/course_redirects_start.erb +++ b/views/course_redirects_start.erb @@ -12,6 +12,7 @@
  • HTTP 302 Redirect
  • HTTP 303 Redirect
  • HTTP 307 Redirect
  • +
  • Meta Refresh "Soft" Redirect