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

Commit

Permalink
tls fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed Feb 8, 2011
1 parent 61af420 commit 448e0f4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/https.js
Expand Up @@ -7,6 +7,8 @@ function Server(opts, requestListener) {
if (!(this instanceof Server)) return new Server(opts, requestListener); if (!(this instanceof Server)) return new Server(opts, requestListener);
tls.Server.call(this, opts, http._connectionListener); tls.Server.call(this, opts, http._connectionListener);


this.httpAllowHalfOpen = false;

if (requestListener) { if (requestListener) {
this.addListener('request', requestListener); this.addListener('request', requestListener);
} }
Expand Down
2 changes: 2 additions & 0 deletions lib/tls.js
Expand Up @@ -269,6 +269,8 @@ CryptoStream.prototype._pull = function() {
var havePending = this._pending.length > 0; var havePending = this._pending.length > 0;


while (this._pending.length > 0) { while (this._pending.length > 0) {
if (!this.pair._ssl) break;

var tmp = this._pending.shift(); var tmp = this._pending.shift();
var cb = this._pendingCallbacks.shift(); var cb = this._pendingCallbacks.shift();


Expand Down
2 changes: 1 addition & 1 deletion src/node_crypto.cc
Expand Up @@ -651,7 +651,7 @@ Handle<Value> Connection::ClearIn(const Arguments& args) {
size_t buffer_length = Buffer::Length(buffer_obj); size_t buffer_length = Buffer::Length(buffer_obj);


size_t off = args[1]->Int32Value(); size_t off = args[1]->Int32Value();
if (off >= buffer_length) { if (off > buffer_length) {
return ThrowException(Exception::Error( return ThrowException(Exception::Error(
String::New("Offset is out of bounds"))); String::New("Offset is out of bounds")));
} }
Expand Down

0 comments on commit 448e0f4

Please sign in to comment.