Fix a WebSocket-related crash
Ruby: set HTTP_CONNECTION to "upgrade" for upgraded connections.

Closes GH-1306.