@@ -24,7 +24,6 @@ exports.XMLHttpRequest = function() {
2424 var https = require ( 'https' ) ;
2525
2626 // Holds http.js objects
27- var client ;
2827 var request ;
2928 var response ;
3029
@@ -154,7 +153,6 @@ exports.XMLHttpRequest = function() {
154153 // Check for valid request method
155154 if ( ! isAllowedHttpMethod ( method ) ) {
156155 throw "SecurityError: Request method not allowed" ;
157- return ;
158156 }
159157
160158 settings = {
@@ -176,7 +174,7 @@ exports.XMLHttpRequest = function() {
176174 */
177175 this . setDisableHeaderCheck = function ( state ) {
178176 disableHeaderCheck = state ;
179- }
177+ } ;
180178
181179 /**
182180 * Sets a header for the request.
@@ -267,14 +265,14 @@ exports.XMLHttpRequest = function() {
267265
268266 var ssl = false , local = false ;
269267 var url = Url . parse ( settings . url ) ;
270-
268+ var host ;
271269 // Determine the server
272270 switch ( url . protocol ) {
273271 case 'https:' :
274272 ssl = true ;
275273 // SSL & non-SSL both need host, no break here.
276274 case 'http:' :
277- var host = url . hostname ;
275+ host = url . hostname ;
278276 break ;
279277
280278 case 'file:' :
@@ -283,7 +281,7 @@ exports.XMLHttpRequest = function() {
283281
284282 case undefined :
285283 case '' :
286- var host = "localhost" ;
284+ host = "localhost" ;
287285 break ;
288286
289287 default :
@@ -446,7 +444,7 @@ exports.XMLHttpRequest = function() {
446444 + ( data ? "req.write('" + data . replace ( / ' / g, "\\'" ) + "');" :"" )
447445 + "req.end();" ;
448446 // Start the other Node Process, executing this string
449- syncProc = spawn ( process . argv [ 0 ] , [ "-e" , execString ] ) ;
447+ var syncProc = spawn ( process . argv [ 0 ] , [ "-e" , execString ] ) ;
450448 while ( ( self . responseText = fs . readFileSync ( syncFile , 'utf8' ) ) == "" ) {
451449 // Wait while the file is empty
452450 }
0 commit comments