diff --git a/AUTHORS b/AUTHORS
index fd81948b70..aeaa3df82f 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -161,3 +161,4 @@ Joe Walnes
Koichi Kobayashi
Daniel Gröber
Konstantin Käfer
+Richard Rodger
diff --git a/ChangeLog b/ChangeLog
index 11c29cd359..4b4b7a218a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,36 @@
+2011.02.19, Version 0.4.1 (stable)
+
+* Fixed field merging with progressive fields on writeHead()
+ (TJ Holowaychuk)
+
+* Make the repl respect node_modules folders (isaacs)
+
+* Fix for DNS fail in HTTP request (Richard Rodger)
+
+* Default to port 80 for http.request and http.get.
+
+* Improve V8 support for Cygwin (Bert Belder)
+
+* Fix fs.open param parsing. (Felix Geisendörfer)
+
+* Fixed null signal.
+
+* Fix various HTTP and HTTPS bugs
+
+* cmake improvements (Tom Hughes)
+
+* Fix: TLS sockets should not be writable after 'end'
+
+* Fix os.cpus() on cygwin (Brian White)
+
+* MinGW: OpenSSL support (Bert Belder)
+
+* Upgrade V8 to 3.1.5, libev to 4.4.
+
+
2011.02.10, Version 0.4.0 (stable)
-* require() improvements (isaacs)
+* require() improvements (isaacs)
- understand package.json (isaacs)
- look for 'node_modules' dir
diff --git a/doc/index.html b/doc/index.html
index 797b121b0f..7ae6022187 100644
--- a/doc/index.html
+++ b/doc/index.html
@@ -20,7 +20,7 @@
Download
ChangeLog
About
- v0.4.0 docs
+ v0.4.1 docs
Wiki
@@ -90,9 +90,9 @@ net.createServer(function (socket) {
- 2011.02.10
- node-v0.4.0.tar.gz
- (Documentation)
+ 2011.02.19
+ node-v0.4.1.tar.gz
+ (Documentation)
Historical: versions, docs
diff --git a/lib/fs.js b/lib/fs.js
index 62712d57f8..3eb31a99fc 100644
--- a/lib/fs.js
+++ b/lib/fs.js
@@ -921,6 +921,9 @@ ReadStream.prototype.resume = function() {
this.buffer = null;
}
+ // hasn't opened yet.
+ if (null == this.fd) return;
+
this._read();
};
diff --git a/lib/http.js b/lib/http.js
index c208990c90..af6a40932b 100644
--- a/lib/http.js
+++ b/lib/http.js
@@ -1282,7 +1282,8 @@ Agent.prototype._establishNewConnection = function() {
// but outgoingFlush instead.
if (!req.shouldKeepAlive) {
debug('AGENT socket.end()');
- socket.end();
+ if (socket.writable) socket.end();
+ assert(!socket.writable);
} else {
debug('AGENT socket keep-alive');
}
diff --git a/lib/tls.js b/lib/tls.js
index 9760490b61..e27d1aa0ce 100644
--- a/lib/tls.js
+++ b/lib/tls.js
@@ -553,6 +553,9 @@ SecurePair.prototype._destroy = function() {
this._ssl.close();
this._ssl = null;
+ self.encrypted.writable = self.encrypted.readable = false;
+ self.cleartext.writable = self.cleartext.readable = false;
+
process.nextTick(function() {
self.encrypted.emit('end');
if (self.encrypted.onend) self.encrypted.onend();
diff --git a/src/platform_cygwin.cc b/src/platform_cygwin.cc
index 416cb1735f..9338d4f4b8 100644
--- a/src/platform_cygwin.cc
+++ b/src/platform_cygwin.cc
@@ -99,8 +99,7 @@ static inline char* _getProcessTitle() {
if (GetLastError()) {
_winapi_perror("GetConsoleTitleW");
return NULL;
- }
- else {
+ } else {
// The title is empty, so return empty string
process_title = strdup("\0");
return process_title;
@@ -252,6 +251,7 @@ int Platform::GetExecutablePath(char* buffer, size_t* size) {
}
int Platform::GetCPUInfo(Local *cpus) {
+ HandleScope scope;
Local