19

I set force_ssl to true by accident and then when reverting to false and running server I get the following error:

ERROR bad Request-Line 

WEBrick 1.3.1
INFO  ruby 1.9.3 (2012-02-16) [x86_64-darwin11.4.0]
WEBrick::HTTPServer#start: pid=472 port=3000
ERROR bad Request-Line `\x16\x03\x01\x00?\x01\x00\x00?\x03\x02P?Mf\x00??C?'.

How can I fix this?

When I hit http url on local host it redirects to https and gives me this error:

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.
Benamir
  • 1,107
  • 2
  • 11
  • 24

4 Answers4

16

Answer can be found here: How to use deactivate Webrick's SSL

you can fix it by clearing the browser cookies and it works again. It seems the authentication information is saved in the cookie and keeps reverting our requests to HTTPS but does not authenticate correctly so you get that error.

Community
  • 1
  • 1
Benamir
  • 1,107
  • 2
  • 11
  • 24
6

Maybe you can try:

1) stop rails server 2) rake tmp:clear on the command line

Then start again and see if the problem persists.

UPDATE: Maybe you can try to clean any cache content / history content on your browser too.

p.matsinopoulos
  • 7,655
  • 6
  • 44
  • 92
0

I usually end up using a different explorer, i.e.: Safari, Firefox, etc. As clearing the cookies do not solve the problem for me (while using Chrome at least)

marimaf
  • 5,382
  • 3
  • 50
  • 68
0

If you experience this type of issue then follow the steps below:

  1. Stop your rails server
  2. rake tmp:clear #bash command type in terminal
  3. On your computer, open Chrome.
  4. At the top right, click More.
  5. Click More tools. Clear browsing data.
  6. At the top, choose a time range. To delete everything, select All time.
  7. Next to "Cookies and other site data" and "Cached images and files," check the boxes.
  8. Click Clear data.