if you point to a https:// page but your server isn't serving any ssl 
protected content, that error thrown by firefox will stand no matter what. 
normal setups don't take the port into account: in production, for http 
urls the port is always 80 and for https:// the port is 443. If you want 
that to work, you should set your server to reply on port 80 with normal 
content, and with port 443 the protected one. 
You can't serve on port 8000 both normal and ssl protected content.

On Monday, October 8, 2012 7:44:55 PM UTC+2, Bill Thayer wrote:
>
> I think something else is going on...
>
> With the current version from trunk and Masssimo's code above verified to 
> be in gluon/globals.py and 
>
> request.requires_https() 
>
>
> uncommented in db.py the following error occurs:
>
> If I try: https:127.0.0.1:8000/TAMOTO/appadmin/insert/db/auth_user
> I get an error in fire fox:
> Secure Connection Failed
>       
>         
>           An error occurred during a connection to 127.0.0.1:8000.
>
> SSL received a record that exceeded the maximum permissible length.
>
> (Error code: ssl_error_rx_record_too_long)
>
>   The page you are trying to view cannot be shown because the authenticity 
> of the received data could not be verified.
>   Please contact the website owners to inform them of this problem. 
> Alternatively, use the command found in the help menu to report this broken 
> site.
>
> Here is my current code but the login script with request.requires_https() 
> commented out will keep redirecting me to the login screen.
> details='db.py entered'
> logger.info("You ought to know that %s" %details)
> ## if SSL/HTTPS is properly configured and you want all HTTP requests to
> ## be redirected to HTTPS, uncomment the line below:
> request.requires_https()
>
> details='SLL enabled'
> logger.info("You ought to know that %s" %details)
>
> if not request.env.web2py_runtime_gae:
>     ## if NOT running on Google App Engine use SQLite or other DB
>     db = DAL(settings.database_uri, check_reserved=['oracle'])
>     session.secure()
>     session.connect(request, response, db)
>     if db:
>             details='secure request response session connected'
>     else:
>             details='DAL not connected'
>     logger.info("You ought to know that %s" %details)
> else:
>     ## connect to Google BigTable (optional 
> 'google:datastore://namespace')
>     db = DAL('google:datastore')
>     ## store sessions and tickets there
>     session.connect(request, response, db = db)
>     ## or store session in Memcache, Redis, etc.
>     ## from gluon.contrib.memdb import MEMDB
>     ## from google.appengine.api.memcache import Client
>     ## session.connect(request, response, db = MEMDB(Client()))
>
>
>

-- 



Reply via email to