fixed AttributeError bug in upgrade

WebSocketTool.upgrade is supposed to raise a HandshakeError with the message "Header %s is not defined" if either the "Upgrade" or "Connection" header is missing.

However, the expression on line 126 of cherrypyserver.py:

request.headers.get(key).lower()

raises an AttributeError with the message "'NoneType' object has no attribute 'lower'" if one of those headers is missing, which prevents the intended error message from ever being displayed.

This commit fixes this problem by replacing get(key) with get(key, '') since the empty string evaluates as false.
Merge pull request #54 from ralhei/master

The binary state is provided through the function call since the message can be a string or a Message instance.
Merge pull request #53 from EliAndrewC/master

Minor fix which turns an unintentional and confusing error message into the intended error message
Work around bug in Python 2.6.x's urlparse.urlsplit() function.

Remove redundant host / port / scheme parsing.

Remove unused modules.

Fix typo.
Merge pull request #60 from dsully/master

Work around Python 2.6.X bug in urlparse.urlsplit()
Fix #58
Fix #55
let's display the author
we don't need those
updated version shown in docs
using the builtin next function to consume the generator rather than its next method
using 'as' for the exception instance
using the next builtin method to consume generator
initial support for Python 3 #29
initial support for Python 3 #29
running tests against py3k as well
updated README with 3.x support
using print function rather than print statement for p3k compat
updated Python requirements to reflect py3k support
updated version