Skip to content

Commit

Permalink
Keep require('https') from throwing if node is compiled with --withou…
Browse files Browse the repository at this point in the history
…t-ssl. This will still throw for Invalid Protocol if https is used. Which makes more sense and makes request work without SSl support.
  • Loading branch information
davglass committed Mar 22, 2011
1 parent c08758e commit 0b7d675
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@
// limitations under the License.

var http = require('http')
, https = require('https')
, https = false
, url = require('url')
, util = require('util')
, stream = require('stream')
, qs = require('querystring')
;

try {
https = require('https');
} catch (e) {}

var toBase64 = function(str) {
return (new Buffer(str || "", "ascii")).toString("base64");
};
Expand Down

0 comments on commit 0b7d675

Please sign in to comment.