Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

tls fixes

  • Loading branch information...
commit 448e0f43940c1616d94353bd2323877b4814cec2 1 parent 61af420
ry ry authored
Showing with 5 additions and 1 deletion.
  1. +2 −0  lib/https.js
  2. +2 −0  lib/tls.js
  3. +1 −1  src/node_crypto.cc
2  lib/https.js
View
@@ -7,6 +7,8 @@ function Server(opts, requestListener) {
if (!(this instanceof Server)) return new Server(opts, requestListener);
tls.Server.call(this, opts, http._connectionListener);
+ this.httpAllowHalfOpen = false;
+
if (requestListener) {
this.addListener('request', requestListener);
}
2  lib/tls.js
View
@@ -269,6 +269,8 @@ CryptoStream.prototype._pull = function() {
var havePending = this._pending.length > 0;
while (this._pending.length > 0) {
+ if (!this.pair._ssl) break;
+
var tmp = this._pending.shift();
var cb = this._pendingCallbacks.shift();
2  src/node_crypto.cc
View
@@ -651,7 +651,7 @@ Handle<Value> Connection::ClearIn(const Arguments& args) {
size_t buffer_length = Buffer::Length(buffer_obj);
size_t off = args[1]->Int32Value();
- if (off >= buffer_length) {
+ if (off > buffer_length) {
return ThrowException(Exception::Error(
String::New("Offset is out of bounds")));
}
Please sign in to comment.
Something went wrong with that request. Please try again.