Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Commit

Permalink
Clean-up whitespace.
Browse files Browse the repository at this point in the history
  • Loading branch information
eee-c authored and jed committed May 6, 2010
1 parent c4d0490 commit f010437
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions apps/fab.nodejs.http.js
Expand Up @@ -13,31 +13,31 @@ exports.app = function( app ) {

return app.call( function listener( obj ) {

if (obj) {
var loc = obj.url || url.parse( obj.body );

http
.createClient( loc.port || 80, loc.hostname )
.request(
obj.method || "GET",
loc.pathname + ( loc.search || "" ),
obj.headers || { host: loc.hostname }
)
.addListener( "response", function( response ) {
out = out({
status: response.statusCode,
headers: response.headers
});

response
.addListener( "data", function( chunk ) {
if ( out ) out = out({ body: chunk });
})
.addListener( "end", out )
.setBodyEncoding( "utf8" );
})
if (obj) {
var loc = obj.url || url.parse( obj.body );

http
.createClient( loc.port || 80, loc.hostname )
.request(
obj.method || "GET",
loc.pathname + ( loc.search || "" ),
obj.headers || { host: loc.hostname }
)
.addListener( "response", function( response ) {
out = out({
status: response.statusCode,
headers: response.headers
});

response
.addListener( "data", function( chunk ) {
if ( out ) out = out({ body: chunk });
})
.addListener( "end", out )
.setBodyEncoding( "utf8" );
})
.end();
}
}
return listener;
});
}
Expand Down

0 comments on commit f010437

Please sign in to comment.