1. Mar 02, 2013
  2. Mar 01, 2013
    • Timothy J Fontaine's avatar
      f0f87d8a
    • isaacs's avatar
      doc: Provide 2 examples of SimpleProtocol parser · 4926ffd1
      isaacs authored
      The first example uses Readable, and shows the use of
      readable.unshift().  The second uses the Transform class, showing that
      it's much simpler in this case.
      4926ffd1
    • isaacs's avatar
      stream: There is no _read cb, there is only push · 88644eaa
      isaacs authored
      This makes it so that `stream.push(chunk)` is the only way to signal the
      end of reading, removing the confusing disparity between the
      callback-style _read method, and the fact that most real-world streams
      do not have a 1:1 corollation between the "please give me data" event,
      and the actual arrival of a chunk of data.
      
      It is still possible, of course, to implement a `CallbackReadable` on
      top of this.  Simply provide a method like this as the callback:
      
          function readCallback(er, chunk) {
            if (er)
              stream.emit('error', er);
            else
              stream.push(chunk);
          }
      
      However, *only* fs streams actually would behave in this way, so it
      makes not a lot of sense to make TCP, TLS, HTTP, and all the rest have
      to bend into this uncomfortable paradigm.
      88644eaa
    • isaacs's avatar
      stream: Add stream.unshift(chunk) · 4b67f0be
      isaacs authored
      4b67f0be
    • isaacs's avatar
      stream: Break up the onread function · 7764b842
      isaacs authored
      A primary motivation of this is to make the onread function more
      inline-friendly, but also to make it more easy to explore not having
      onread at all, in favor of always using push() to signal the end of
      reading.
      7764b842
    • Ben Noordhuis's avatar
      net: omit superfluous 'connect' event · c1161202
      Ben Noordhuis authored
      Don't emit a 'connect' event on sockets that are handed off to
      net.Server 'connection' event listeners.
      
      1. It's superfluous because the connection has already been established
         at that point.
      
      2. The implementation is arguably wrong because the event is emitted on
         the same tick of the event loop while the rule of thumb is to always
         emit it on the next one.
      
      This has been tried before in commit f0a440d8 but was reverted again in
      ede1acc1 because the change was incomplete (at least one test hadn't
      been updated).
      
      Fixes #1047 (again).
      c1161202
    • Ben Noordhuis's avatar
      deps: upgrade libuv to 2a8d2a5 · bb431531
      Ben Noordhuis authored
      bb431531
    • Ben Noordhuis's avatar
      test: disable simple/test-process-getgroups on os x · c53b9216
      Ben Noordhuis authored
      The output of `id -G` is unreliable on OS X. It uses an undocumented
      Libsystem function called getgrouplist_2() that includes some auxiliary
      groups that the POSIX getgroups() function does not return.
      
      Or rather, not always. It leads to fun bug chases where the test fails
      in one terminal but not in another.
      c53b9216
    • Ben Noordhuis's avatar
      Merge remote-tracking branch 'origin/v0.8' · d019bec7
      Ben Noordhuis authored
      d019bec7
    • Timothy J Fontaine's avatar
      test: fix tap output on windows · d032ff49
      Timothy J Fontaine authored
      Test output is always \n and not platform dependent
      d032ff49
    • Ben Noordhuis's avatar
      lib, src: remove errno global · 12d0f0bd
      Ben Noordhuis authored
      Remove the errno global. It's a property on the process object now.
      
      Fixes #3095.
      12d0f0bd
    • Scott Blomquist's avatar
      test: add cleanup to long path test · 1762ba37
      Scott Blomquist authored
      1762ba37
  3. Feb 28, 2013
    • Ben Noordhuis's avatar
      Merge remote-tracking branch 'origin/v0.8' · cb87920b
      Ben Noordhuis authored
      Conflicts:
      	AUTHORS
      	ChangeLog
      	deps/uv/src/unix/pipe.c
      	lib/http.js
      	src/node_version.h
      cb87920b
    • Ben Noordhuis's avatar
      build, windows: disable SEH · d8790428
      Ben Noordhuis authored
      Turn off safe exception handlers, they're incompatible with how
      openssl is compiled / linked under MSVS 2012.
      
      Addresses the following build error:
      
        openssl.lib(x86cpuid.obj) : error LNK2026: module unsafe for SAFESEH
        image. [g:\jenkins\workspace\nodejs-oneoff\node.vcxproj]
        openssl.lib(x86.obj) : error LNK2026: module unsafe for SAFESEH
        image. [g:\jenkins\workspace\nodejs-oneoff\node.vcxproj]
        # etc. etc.
        g:\jenkins\workspace\nodejs-oneoff\Release\node.exe : fatal error
        LNK1281: Unable to generate SAFESEH image.
        [g:\jenkins\workspace\nodejs-oneoff\node.vcxproj]
      
      Fixes #4242.
      d8790428
    • Ben Noordhuis's avatar
      doc: update instructions on home page · 522668b5
      Ben Noordhuis authored
      Document how to run the example on the home page in more detail.
      
      Apparently our Windows brethren are prone to double-clicking on the
      binary instead of running it from the command line.
      
      Fixes #4854.
      522668b5
    • Trevor Norris's avatar
      process: separate nextTick domain logic · 0c1e7b53
      Trevor Norris authored
      It's cleaner to only load domain ticker logic when the domains are being
      used. This makes execution slightly quicker in both cases, and simpler
      from the spinner since there is no need to check if the latest callback
      requires use of domains.
      0c1e7b53
    • isaacs's avatar
      core: Remove the nextTick for running the main file · 875e4a0c
      isaacs authored
      Not necessary, since we can handle the error properly on the first tick
      now, even if there are event listeners, etc.
      
      Additionally, this removes the unnecessary "_needTickCallback" from
      startup, since Module.loadMain() will kick off a nextTick callback right
      after it runs the main module.
      
      Fix #4856
      875e4a0c
    • isaacs's avatar
      core: Mark exit() calls with status codes · 95862b23
      isaacs authored
      Also, exit with 128+n for signal exit n, as is The Unix Way.
      95862b23
    • Ben Noordhuis's avatar
      crypto: clear error stack · c6e2db2f
      Ben Noordhuis authored
      Clear OpenSSL's error stack on return from Connection::HandleSSLError().
      This stops stale errors from popping up later in the lifecycle of the
      SSL connection where they would cause spurious failures.
      
      This commit causes a 1-2% performance regression on `make bench-tls`.
      We'll address that in follow-up commits if possible but let's ensure
      correctness first.
      
      Fixes #4771.
      c6e2db2f