1. Aug 17, 2015
    • Ryan Graham's avatar
      net: ensure Socket reported address is current · 1738c968
      Ryan Graham authored
      Any time the connection state or the underlying handle itself changes,
      the socket's name (aka, local address) can change.
      
      To deal with this we need to reset the cached sockname any time we
      set or unset the internal handle or an existing handle establishes a
      connection.
      
      PR-URL: https://github.com/nodejs/io.js/pull/2095
      
      
      Reviewed-By: default avatarBen Noordhuis <info@bnoordhuis.nl>
      Reviewed-By: default avatarJeremiah Senkpiel <fishrock123@rocketmail.com>
      1738c968
    • Gireesh Punathil's avatar
      test: address timing issues in simple http tests · cf9ba813
      Gireesh Punathil authored
      
      
      simple tests test-http-request-end.js, test-http-default-encoding.js
      hangs in AIX. The root cause for both the failures is related to the
      timing with which packets are sent between the client and server.
      On the client side, one factor that affects the timing is Nagle's
      algorithm. With Nagle enabled there may be a delay between two packets
      as the stack may wait until either:
        a. An acknowledgement for the first packet is received, or
        b. 200 ms elapses.
      before sending the second packet.
      
      Similarly at the server side 2 sequential packages can be delivered to
      the application either together or separatly.
      
      On AIX we see that they are delivered separately to the server, while on
      Linux delivered together. If we change the timing, for example disabling
      Nagle on AIX we see the 2 packets delivered together and the tests pass.
      
      In the test case simple/test-http-request-end.js, the client request
      handler of the server receives and stores the data in a data callback,
      closes the server in a request end callback, and writes to the client
      and ends the response, in-line with the request receipt. An HTTP parser
      module parses the incoming message, and invokes callback routines which
      are registered for HTTP events (such as header, body, end etc.)
      
      Because the termination sequence arrive in a separate packet, there is a
      delay in parsing that message and identify that the client request ended
      (and thereby invoke the request end call backhandler). Due to this delay,
      the response close happens first, which in-turn destroys the server
      socket leading to the fd and watcher removal from the uv loop abandoning
      further events on this connection, and end call back never being called,
      causing the reported hang.  simple/test-http-default-encoding.js suffers
      from the same problem.
      
      Also, remove the timer logic from the test case. Test harness anyways
      contain a timer which controls the individual tests so remove such
      controls from the test case, as suggested by @tjfontaine
      
      Reviewed-By: default avatarMichael Dawson <michael_dawson@ca.ibm.com>
      PR-URL: https://github.com/joyent/node/pull/9432
      
      PORT-FROM: joyent/node @ 13e11314
      PR-URL: https://github.com/nodejs/io.js/pull/2294
      
      
      Reviewed-By: default avatarFedor Indutny <fedor.indutny@gmail.com>
      Reviewed-By: default avatarBen Noordhuis <info@bnoordhuis.nl>
      cf9ba813
    • James M Snell's avatar
      doc: multiple documentation updates cherry picked from v0.12 · e76822f4
      James M Snell authored
      
      
       * doc: improve http.abort description
       * doc: mention that mode is ignored if file exists
       * docs: Fix default options for fs.createWriteStream()
       * Documentation update about Buffer initialization
       * doc: add a note about readable in flowing mode
       * doc: Document http.request protocol option
       * doc, comments: Grammar and spelling fixes
       * updated documentation for fs.createReadStream
       * Update child_process.markdown, spelling
       * doc: Clarified read method with specified size argument.
       * docs:events clarify emitter.listener() behavior
       * doc: two minor stream doc improvements
       * doc: clarify Readable._read and Readable.push
       * doc: stream.unshift does not reset reading state
       * doc: readable event clarification
       * doc: additional refinement to readable event
      
      Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
      Reviewed-By: default avatarBen Noorduis <ben@strongloop.com>
      PR-URL: https://github.com/nodejs/io.js/pull/2302
      e76822f4
  2. Aug 06, 2015
  3. Aug 05, 2015