Permalink
Commits on Jun 12, 2011
Commits on Jun 11, 2011
  1. Remove unneeded element type check.

    zewt committed Jun 11, 2011
    Unknown top-level elements in the jabber:client namespace generate
    unsupported-stanza-type error in handle_unhandled_stanza, which is
    nonfatal.  Don't generate a fatal invalid-top-level-element error.
  2. Fix error when the connection is closed more than once.

    zewt committed Jun 11, 2011
    For example, <body><error/><error/></body> will cause this.
  3. Fix inconsistent unsupported-stanza-type handling.

    zewt committed Jun 11, 2011
    These two streams should not be treated differently; they're equivalent XML:
    
    <stream:stream xmlns="jabber:client"><garbage/>
    <stream:stream xmlns="jabber:client"><garbage xmlns="jabber:client"/>
  4. Fix rerequests.

    zewt committed Jun 11, 2011
    If RID#1 received a response and RID#2 was held awaiting one, and new
    requests are received for both RID#1 and RID#2, the response to RID#1
    needs to be resent, and RID#2 needs to go back into outbound_requests
    awaiting a response.
    
    Previously, RID#1 would receive its response, but RID#2 would trigger
    an error, since it didn't yet have a response.
Commits on Jun 6, 2011
  1. Fix incorrect namespace prefix set for stream:error.

    zewt committed Jun 6, 2011
    This was setting xmlns:streams, leaving stream:error with an undefined
    namespace prefix.
Commits on May 31, 2011
  1. Remove time+3 hack.

    zewt committed May 31, 2011
    This just pushes timeouts slightly into the past.  Wait timeouts and
    inactive timeouts are unrelated.
  2. Treat 'wait' as per-session, not per-request.

    zewt committed May 31, 2011
    Instead of treating 'wait' as the length of time each request can go
    unanswered, treat it as the amount of time the session can go without
    responding to at least one held request.  There's no point in responding
    to every held request after the wait period; all this does is flush
    the entire wait queue, increasing latency if we need to send a response
    before the new held request comes in, and increasing traffic.
    
    The spec is vague about this, but this is the only behavior that makes
    sense.
Commits on May 30, 2011
  1. Fix up restart requests.

    zewt committed May 30, 2011
    Restarts do need to behave asynchronously: a restart in a later request
    takes effect immediately, regardless of earlier held requests.
  2. Default to a higher column width.

    zewt committed May 30, 2011
    This avoids the log jumping widths every time the server starts, which
    is jarring while debugging.  This value is long enough to fit the UUIDs
    in BOSH session IDs.
Commits on May 29, 2011
  1. Remove redundant code path for idle shutdown.

    zewt committed May 29, 2011
    Use session:close (bosh_close_stream), so we always shut down in the
    same way.
  2. Fixup inactive/waiting handling.

    zewt committed May 29, 2011
    Always add to waiting and remove from inactive when the request moves
    into outbound_requests.
Commits on May 28, 2011
  1. Add .gitignore.

    zewt committed May 28, 2011
  2. Clarify namespace handling.

    zewt committed May 28, 2011
  3. Clarify namespace handling.

    zewt committed May 28, 2011
  4. Advertise and require xbosh stream restarts.

    zewt committed May 28, 2011
    This is strict about receiving restarts, because with a non-proxy BOSH
    server, failing to restart when needed or restarting when not expected
    would desynchronize the BOSH server from the XMPP server.  We can detect
    this reliably more easily than a proxy can, so do so.
    
    The spec doesn't explain what should happen if an empty request is
    received when a restart is needed.  This can easily happen if a pipelining
    client sends empty requests in the background while authentication is
    taking place.  Stream restarts should be handled like pause and terminate
    requests: trigger immediately, flushing any earlier requests in the
    pipeline, which is what's implemented here.
  5. Fix response handling when pipelining isn't in use.

    zewt committed May 28, 2011
    The request needs to be moved to outbound_requests before processing the
    stanzas, so any packets sent while processing those stanzas can be sent
    using the request.
  6. Initial pause support.

    zewt committed May 28, 2011
    On pause, flush out all held connections and increase the timeout.
    
    This also fixes termination: when a terminate is received, flush requests
    cleanly rather than killing the connection immediately.
  7. Fixup inbound_requests, so inactivity timeouts work again.

    zewt committed May 28, 2011
    This isn't tied to HTTP connections opening and closing anymore,
    since we can have an open HTTP connection that doesn't have a
    pending request.
    
    (This commit has the readable version; the next one will fix the
    indentation.)
  8. Increase hold and requests.

    zewt committed May 28, 2011
    This enables bidirectional pipelining.
  9. Guarantee that 'requests' is always greater than 'hold'.

    zewt committed May 28, 2011
    The BOSH protocol breaks down if this isn't done: if you're not allowed
    to send at least one request on top of your holds, you can't send new
    packets.  (The protocol should mandate this.)
  10. If data is buffered, always buffer.

    zewt committed May 28, 2011
    Ensure that if we have data buffered, send() requests always buffer;
    don't send data immediately or it'll go out out of order.
  11. Fix outbound_requests flushing on termination.

    zewt committed May 28, 2011
    Calling held_request:send will remove the item from outbound_requests,
    so ipairs will get confused and skip entries.
  12. Fixup waiting_requests.

    zewt committed May 28, 2011
    waiting_requests essentially mirrors outbound_requests, so requests
    should be removed from it when they're removed from outbound_requests.