1. Feb 27, 2013
  2. Feb 26, 2013
  3. Feb 25, 2013
    • isaacs's avatar
      stream: Do not switch to objectMode implicitly · 34046084
      isaacs authored
      Only handle objects if explicitly told to do so in the options
      object.  Non-buffer/string chunks are an error if not already in
      objectMode.
      
      Close #4662
      34046084
    • isaacs's avatar
      stream: Start out in sync=true state · e03bc472
      isaacs authored
      The Readable and Writable classes will nextTick certain things
      if in sync mode.  The sync flag gets unset after a call to _read
      or _write.  However, most of these behaviors should also be
      deferred until nextTick if no reads have been made (for example,
      the automatic '_read up to hwm' behavior on Readable.push(chunk))
      
      Set the sync flag to true in the constructor, so that it will not
      trigger an immediate 'readable' event, call to _read, before the
      user has had a chance to set a _read method implementation.
      e03bc472
    • Ben Noordhuis's avatar
      crypto: fix base64 padding regression · 4231dab3
      Ben Noordhuis authored
      Commit 9901b69c introduces a small regression where the trailing base64
      padding is no longer written out when Cipher#final is called. Rectify
      that.
      
      Fixes #4837.
      4231dab3
  4. Feb 24, 2013
  5. Feb 23, 2013
  6. Feb 22, 2013
    • isaacs's avatar
      stream: Return false from push() more properly · a63c28e6
      isaacs authored
      There are cases where a push() call would return true, even though
      the thing being pushed was in fact way way larger than the high
      water mark, simply because the 'needReadable' was already set, and
      would not get unset until nextTick.
      
      In some cases, this could lead to an infinite loop of pushing data
      into the buffer, never getting to the 'readable' event which would
      unset the needReadable flag.
      
      Fix by splitting up the emitReadable function, so that it always
      sets the flag on this tick, even if it defers until nextTick to
      actually emit the event.
      
      Also, if we're not ending or already in the process of reading, it
      now calls read(0) if we're below the high water mark.  Thus, the
      highWaterMark value is the intended amount to buffer up to, and it
      is smarter about hitting the target.
      a63c28e6
    • isaacs's avatar
      stream: remove lowWaterMark feature · 3b2e9d26
      isaacs authored
      It seems like a good idea on the face of it, but lowWaterMarks are
      actually not useful, and in practice should always be set to zero.
      
      It would be worthwhile for writers if we actually did some kind of
      writev() type of thing, but actually this just delays calling write()
      and the overhead of doing a bunch of Buffer copies is not worth the
      slight benefit of calling write() fewer times.
      3b2e9d26
    • isaacs's avatar
      089ec586
    • Nathan Rajlich's avatar
      50c88e0f
    • Nathan Rajlich's avatar
      4b61522f
    • Arianit Uka's avatar
      path: join throws TypeError on non-string args · 055110da
      Arianit Uka authored
      lib/path.js:
        - throws a TypeError on the filter if the argument is not a string.
      
      test/simple/test-path.js:
        - removed the test to check if non-string types are filtered.
        - added a test to check if path.join throws TypeError on arguments that
          are not strings.
      055110da
    • Fedor Indutny's avatar
      tls: _handle.readStart/readStop for CryptoStream · ebc95f07
      Fedor Indutny authored
      lib/http.js is using stream._handle.readStart/readStop to control
      data-flow coming out from underlying stream. If this methods are not
      present - data might be buffered regardless of whether it'll be read.
      
      see #4657
      ebc95f07
    • Trevor Norris's avatar
      process: fix bug where spinner wasn't called · 7301ba39
      Trevor Norris authored
      Apperently there is a case where calling the spinner was required after
      passing a callback to nextTick(). This fixes that issue.
      7301ba39
  7. Feb 21, 2013
  8. Feb 20, 2013
    • Ben Noordhuis's avatar
      node: code cleanup, make tick_infobox static · 57ef6591
      Ben Noordhuis authored
      It's not used outside of src/node.cc so make it static.
      57ef6591
    • Ben Noordhuis's avatar
      crypto: fix uninitialized memory access in openssl · 0dcbecd3
      Ben Noordhuis authored
      ASN1_STRING_to_UTF8() passes an ASN1_STRING to ASN1_STRING_set() but forgot to
      initialize the `length` field.
      
      Fixes the following valgrind error:
      
        $ valgrind -q --track-origins=yes --num-callers=19 \
            out/Debug/node test/simple/test-tls-client-abort.js
        ==2690== Conditional jump or move depends on uninitialised value(s)
        ==2690==    at 0x784B69: ASN1_STRING_set (asn1_lib.c:382)
        ==2690==    by 0x809564: ASN1_mbstring_ncopy (a_mbstr.c:204)
        ==2690==    by 0x8090F0: ASN1_mbstring_copy (a_mbstr.c:86)
        ==2690==    by 0x782F1F: ASN1_STRING_to_UTF8 (a_strex.c:570)
        ==2690==    by 0x78F090: asn1_string_canon (x_name.c:409)
        ==2690==    by 0x78EF17: x509_name_canon (x_name.c:354)
        ==2690==    by 0x78EA7D: x509_name_ex_d2i (x_name.c:210)
        ==2690==    by 0x788058: ASN1_item_ex_d2i (tasn_dec.c:239)
        ==2690==    by 0x7890D4: asn1_template_noexp_d2i (tasn_dec.c:746)
        ==2690==    by 0x788CB6: asn1_template_ex_d2i (tasn_dec.c:607)
        ==2690==    by 0x78877A: ASN1_item_ex_d2i (tasn_dec.c:448)
        ==2690==    by 0x7890D4: asn1_template_noexp_d2i (tasn_dec.c:746)
        ==2690==    by 0x788CB6: asn1_template_ex_d2i (tasn_dec.c:607)
        ==2690==    by 0x78877A: ASN1_item_ex_d2i (tasn_dec.c:448)
        ==2690==    by 0x787C93: ASN1_item_d2i (tasn_dec.c:136)
        ==2690==    by 0x78F5E4: d2i_X509 (x_x509.c:141)
        ==2690==    by 0x7C9B91: PEM_ASN1_read_bio (pem_oth.c:81)
        ==2690==    by 0x7CA506: PEM_read_bio_X509 (pem_x509.c:67)
        ==2690==    by 0x703C9A: node::crypto::SecureContext::AddRootCerts(v8::Arguments const&) (node_crypto.cc:497)
        ==2690==  Uninitialised value was created by a stack allocation
        ==2690==    at 0x782E89: ASN1_STRING_to_UTF8 (a_strex.c:560)
      0dcbecd3
    • Bert Belder's avatar
      openssl: make perlasm target pentium or newer for masm outputs · da945a73
      Bert Belder authored
      When perlasm generates MASM code it sets the assembler target to 468.
      In this mode MASM refuses to assemble a couple of instructions. Bumping
      the target to 686 solves this problem.
      da945a73
    • Bert Belder's avatar
      openssl: disable HT sidechannel attack mitigation · eb29c4b2
      Bert Belder authored
      It used to be off before. It's extremely unlikely that such an attack
      would be a viable attack against node. And it makes AES much slower.
      eb29c4b2