celluloid / reel

UNMAINTAINED: See celluloid/celluloid#779 - Celluloid::IO-powered web server
https://celluloid.io
MIT License
596 stars 87 forks source link

SSLServer responses demand explicit Content-Type #80

Closed digitalextremist closed 11 years ago

digitalextremist commented 11 years ago

I am implementing SSLServer. So far it has bolted-on to the existing environment I have really well, but there is one issue to resolve. It might be in my own use case but it seems to be general, or theoretical.

Responses are being interpreted as plaintext on Chrome and Safari, do not seem to resolve at all under Firefox ( both on Mac OS X 10.7 )... unless Content-Type: text/html is explicitly set on the response.

Adding a Content-Type causes proper behavior, and that includes specifying a MIME type for static files. Ought this be included in Response itself?

tarcieri commented 11 years ago

SSLServer is already implemented...

https://github.com/celluloid/reel/blob/master/lib/reel/ssl_server.rb

Tony Arcieri

On Aug 17, 2013, at 9:47 AM, digitalextremist notifications@github.com wrote:

I am implementing SSLServer. So far it has bolted-on to the existing environment I have really well, but there is one issue to resolve. It might be in my own use case but it seems to be general, or theoretical.

Responses are being interpreted as plaintext on Chrome and Safari, do not seem to resolve at all under Firefox ( both on Mac OS X 10.7 )... unless Content-Type: text/html is explicitly set on the response.

Adding a Content-Type causes proper behavior, and that includes specifying a MIME type for static files. Ought this be included in Response itself?

— Reply to this email directly or view it on GitHubhttps://github.com/celluloid/reel/issues/80 .

digitalextremist commented 11 years ago

Yeah, that is what I am implementing in my application. Not coding it, just using it.

digitalextremist commented 11 years ago

I am providing Content-Type headers for each pageload, and still only Safari works for me, with Chrome and Firefox not even showing source. Any clue where I can look to determine why, and to resolve this?

tarcieri commented 11 years ago

I'll have to double check the current state of this tonight but last I checked things were working in all browsers

digitalextremist commented 11 years ago

Thanks for looking at this. Still wondering what it is.

digitalextremist commented 11 years ago

Using curl, it appears I am getting empty replies, which is odd but explains the Chrome/Firefox behavior. Troubleshooting further.

digitalextremist commented 11 years ago

Wait, I figured out what it is. It's not SSLServer! Surprise, surprise.