如何使用停用 Webrick 的 SSL [英] How to use deactivate Webrick's SSL

查看:52
本文介绍了如何使用停用 Webrick 的 SSL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

上周我尝试在 webbrick 中激活 SSL 的情况下进行调试,但我忘记了如何将设置恢复为默认值(没有 SSL).每次我访问控制器时,它都会显示:

Last week I tried to debug with SSL activated in webbrick, but I forget how to restore the settings to default(without SSL). Every time I visit a controller, now it shows:

SSL 连接错误无法与服务器建立安全连接.这可能是服务器的问题,或者可能需要您没有的客户端身份验证证书.错误 107 (net::ERR_SSL_PROTOCOL_ERROR):SSL 协议错误.

SSL connection error Unable to make a secure connection to the server. This may be a problem with the server, or it may be requiring a client authentication certificate that you don't have. Error 107 (net::ERR_SSL_PROTOCOL_ERROR): SSL protocol error.

下面是控制台的日志,有人可以帮忙吗?

And below is the log from the console, can anyone help?

[2011-05-10 07:28:43] 信息 WEBrick 1.3.1[2011-05-10 07:28:43] INFO ruby​​ 1.8.7 (2009-06-12) [universal-darwin10.0][2011-05-10 07:28:43] 信息 WEBrick::HTTPServer#start:pid=62854 port=3000[2011-05-10 07:28:58] 错误请求行`UQM?x?ʾ???????c??B?????n???BU???*???98?5EDf32?A/??'.

[2011-05-10 07:28:43] INFO WEBrick 1.3.1 [2011-05-10 07:28:43] INFO ruby 1.8.7 (2009-06-12) [universal-darwin10.0] [2011-05-10 07:28:43] INFO WEBrick::HTTPServer#start: pid=62854 port=3000 [2011-05-10 07:28:58] ERROR bad Request-Line `UQM?x?ʾ???????c??B?????n???BU???*???98?5EDf32?A/??'.

推荐答案

我今天刚遇到同样的问题.我将 config.force_ssl = true 添加到 application.rb 文件并得到上述错误.当我删除该行时,错误仍然存​​在.

I just ran into this same exact problem today. I added config.force_ssl = true to the application.rb file and got the above error. When I removed the line, the error still persisted.

我通过清除浏览器 cookie(在本例中为 Chrome)修复了它,它又可以正常工作了.似乎身份验证信息保存在 cookie 中,并且我不断将我们的请求恢复为 HTTPS 但没有正确身份验证,因此您会收到该错误.清除 cookie 可以解决这个问题.

I fixed it by clearing my browser cookies (Chrome in this case) and it works again. It seems the authentication information is saved in the cookie and something i that keeps reverting our requests to HTTPS but does not authenticate correctly so you get that error. Clearing the cookie solves that issue.

这篇关于如何使用停用 Webrick 的 SSL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆