pubnub/pubnub-api — pull request #89 by armanddp (2012-04-19 19:41:05+00:00)
Title: Respect ssl configuration with Net::HTTP 

Without explicitly specifying use_ssl when setting up Net::HTTP the subscribe request will send a plain request to 443 with the following result:

["subscribe", "sub-key", "exchange", "0", "0"]

\r\n

400 The plain HTTP request was sent to HTTPS port

\r\n

\r\n

400 Bad Request

\r\nThe plain HTTP request was sent to HTTPS port\r\n

nginx\r\n

\r\n\r\n"