Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serve index file when path is '/'. #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

iphoting
Copy link
Contributor

@iphoting iphoting commented Mar 4, 2021

Currently, Vienna returns NotFound (404) when accessed with / path.

% rake test
Run options: --seed 27614

# Running:

..FF..

Finished in 0.036410s, 164.7899 runs/s, 302.1148 assertions/s.

  1) Failure:
Vienna::when requesting the root directory#test_0001_should serve the index path [spec.rb:21]:
--- expected
+++ actual
@@ -1 +1,2 @@
-"index"
+# encoding: ASCII-8BIT
+"404"


  2) Failure:
Vienna::when requesting the root directory#test_0002_should return a valid status code, that is 200: OK or 304: Not Modified [spec.rb:25]:
Expected [200, 304] to include 404.

6 runs, 11 assertions, 2 failures, 0 errors, 0 skips

Expected behaviour should be to return index.html instead of 404.html.

My fix passes:

% rake test
Run options: --seed 32465

# Running:

......

Finished in 0.020588s, 291.4319 runs/s, 534.2918 assertions/s.

6 runs, 11 assertions, 0 failures, 0 errors, 0 skips

@iphoting iphoting force-pushed the index-fix branch 2 times, most recently from b999d67 to c62f61f Compare March 4, 2021 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant