Permalink
Browse files

Added public `res.headerSent` checking nodes `res._headerSent`

  • Loading branch information...
1 parent 2d1fdc2 commit 06b3e324ecb7bbd7a3d4accc43f822959c1cb31c @tj tj committed Aug 27, 2011
Showing with 12 additions and 0 deletions.
  1. +12 −0 lib/patch.js
View
12 lib/patch.js
@@ -23,6 +23,18 @@ var _renderHeaders = res._renderHeaders;
if (res._hasConnectPatch) return;
/**
+ * Provide a public "header sent" flag
+ * until node does.
+ *
+ * @return {Boolean}
+ * @api public
+ */
+
+res.__defineGetter__('headerSent', function(){
+ return this._headerSent;
+});
+
+/**
* Set header `field` to `val`, special-casing
* the `Set-Cookie` field for multiple support.
*

0 comments on commit 06b3e32

Please sign in to comment.