Package wtf :: Package app :: Module http_response :: Class UpgradeRequired
[hide private]
[frames] | no frames]

Class UpgradeRequired

source code

              object --+            
                       |            
exceptions.BaseException --+        
                           |        
       exceptions.SystemExit --+    
                               |    
                    HTTPResponse --+
                                   |
                                  UpgradeRequired

426 Upgrade Required (RFC 2817)
Instance Methods [hide private]
tuple
init(self, tokens)
Add upgrade tokens
source code
 
headers(self, collection)
Modify response headers
source code

Inherited from HTTPResponse: __init__, body

Inherited from exceptions.SystemExit: __new__

Inherited from exceptions.BaseException: __delattr__, __getattribute__, __getitem__, __getslice__, __reduce__, __repr__, __setattr__, __setstate__, __str__, __unicode__

Inherited from object: __format__, __hash__, __reduce_ex__, __sizeof__, __subclasshook__

Class Variables [hide private]
str message = '<p>The requested resource can only be retrieved\nus...
Message template
str reason = 'Upgrade Required'
HTTP response reason phrase
int status = 426
HTTP response status

Inherited from HTTPResponse (private): _FRAME

Instance Variables [hide private]

Inherited from HTTPResponse: param

Inherited from HTTPResponse (private): _content_type, _escaped, _replace

Properties [hide private]

Inherited from exceptions.SystemExit: code

Inherited from exceptions.BaseException: args

Inherited from object: __class__

Method Details [hide private]

init(self, tokens)

source code 
Add upgrade tokens
Parameters:
  • tokens (iterable) - List of upgrade tokens to advertise
Returns: tuple
Tuple of unescaped and escaped parameters ((dict, dict))
Overrides: HTTPResponse.init

headers(self, collection)

source code 
Modify response headers
Overrides: HTTPResponse.headers

Class Variable Details [hide private]

message

Message template
Type:
str
Value:
'''<p>The requested resource can only be retrieved
using SSL.  The server is willing to upgrade the current
connection to SSL, but your client doesn\'t support it.
Either upgrade your client, or try requesting the page
using https://.</p>'''