Do not fail without content type #5

Merged
enriclluelles merged 2 commits from do_not_fail_without_content_type into master 2012-01-23 23:13:12 +00:00
enriclluelles commented 2012-01-23 19:58:42 +00:00 (Migrated from github.com)

When using WEBrick(yeah...) and ruby 1.9.3 the Content-Type header is not present on the response from the upper middlewares for some reasone. Then Rack::LiveReload fails because it assumes that the Content-Type header is there.

This doesn't happen with the released gem because it was using case/when syntax.

Although it shouldn't be this middleware responsibility to check that the header is there, it's not nice to crash when it's that easy to prevent

When using WEBrick(yeah...) and ruby 1.9.3 the Content-Type header is not present on the response from the upper middlewares for some reasone. Then Rack::LiveReload fails because it assumes that the Content-Type header is there. This doesn't happen with the released gem because it was using case/when syntax. Although it shouldn't be this middleware responsibility to check that the header is there, it's not nice to crash when it's that easy to prevent
johnbintz commented 2012-01-23 23:13:25 +00:00 (Migrated from github.com)

Derp, thanks for fixing that stupid mistake of mine. :)

Derp, thanks for fixing that stupid mistake of mine. :)
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: github-migration/rack-livereload#5
No description provided.