Permalink
Browse files

Keep require('https') from throwing if node is compiled with --withou…

…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...
1 parent c08758e commit 0b7d6756c120ebf17ce6c70fc1ff4ecd6850e704 @davglass committed Mar 22, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 main.js
View
@@ -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");
};

0 comments on commit 0b7d675

Please sign in to comment.