summaryrefslogtreecommitdiff
path: root/test/simple/test-https-client-reject.js
Commit message (Collapse)AuthorAgeFilesLines
* stream: Don't emit 'end' unless read() calledisaacs2013-03-101-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This solves the problem of calling `readable.pipe(writable)` after the readable stream has already emitted 'end', as often is the case when writing simple HTTP proxies. The spirit of streams2 is that things will work properly, even if you don't set them up right away on the first tick. This approach breaks down, however, because pipe()ing from an ended readable will just do nothing. No more data will ever arrive, and the writable will hang open forever never being ended. However, that does not solve the case of adding a `on('end')` listener after the stream has received the EOF chunk, if it was the first chunk received (and thus, length was 0, and 'end' got emitted). So, with this, we defer the 'end' event emission until the read() function is called. Also, in pipe(), if the source has emitted 'end' already, we call the cleanup/onend function on nextTick. Piping from an already-ended stream is thus the same as piping from a stream that is in the process of ending. Updates many tests that were relying on 'end' coming immediately, even though they never read() from the req. Fix #4942
* tls, https: validate server certificate by defaultBen Noordhuis2012-09-151-5/+4
| | | | | | | | | | | | | | | This commit changes the default value of the rejectUnauthorized option from false to true. What that means is that tls.connect(), https.get() and https.request() will reject invalid server certificates from now on, including self-signed certificates. There is an escape hatch: if you set the NODE_TLS_REJECT_UNAUTHORIZED environment variable to the literal string "0", node.js reverts to its old behavior. Fixes #3949.
* Lint all the JavaScripts.isaacs2012-02-181-1/+1
|
* tls: enable rejectUnauthorized option to clientkoichik2011-12-071-0/+95
Fiexes #2247.