Deprecated Protocol Features

From Second Life Wiki
Jump to: navigation, search

Deprecated protocol feature: stray colon in HTTP 500 responses (viewers 1.20.17 and earlier)

Date posted:

  • 02-March-2008

The following information applies to these versions:

  • Second Life Viewer 1.20
  • Second Life Viewer 1.19.1, 1.19.0.4, or earlier
  • Any third-party viewers based on the source code of Viewer 1.20 or earlier.
Summary:

There is a bug in the LLEventPoll parser code of Viewer 1.20 and all earlier viewers. This code was subsequently fixed (and improved in functionality) in Viewer 1.21.6 and again in Viewer 1.22.

  • Specifically: when a viewer initiates its LLEventPoll request to the simulator, the response from the Apache2 server has always contained a stray colon ":" at the end of its 500 response. The stray colon is a historical anomaly to Second Life's server response, but it is not part of the HTTP protocol.
  • The LLEventPoll parser in Viewer 1.21 and Viewer 1.22 is prepared to handle a server response of 500 without a stray colon.
  • Viewers 1.20.17 and earlier are not prepared to handle a server response without a stray colon. Due to a bug, these earlier viewers depend on the stray colon to be fully functional with the Second Life Grid.


Third-party developers should update the parser code in their viewers to be ready for a future change by the server from "500:" to "500".

The change to server infrastructure described below will take place ON OR AFTER 9-May-2009. After that date, without further warning, the server response may cease to contain a stray colon. Open source viewers based on the obsoleted EventPoll code of viewer 1.20 would cease to fully function at that time, without warning.

Details:

There is a bug in the LLEventPoll parser code of Viewer 1.20 and all earlier viewers. This code was subsequently fixed (and improved in functionality) in Viewer 1.21.6. Viewer 1.20 and earlier can only remain connected to the simulator backbone through its EventPoll connection, due to a series of bad assumptions in code.

Specifically: when the viewer 1.20 initiates its LLEventPoll to the simulator and a server error results, the backbone has historically returned a reply in the format of "500:" or "5xx:" with a stray colon at the end. The viewer's parser relies on a response in this format to generate an internal "499" error, which is the only error code that will cause this viewer to retry its EventPoll connection.

The parser in Viewer 1.20 is not capable of processing a "5xx" response correctly with no colon. In this case no internal "499" error is generated, and it would subsequently kill the EventPoll completely, and cease to acquire any capabilities. Without capabilities, a user of viewer 1.20 is unable to complete Teleports, cross regions, open the World Map, and use other key functionality. However no indication is given to the user of such silent failures; the result would appear only as a mysterious loss of functionality.


Changes in Viewer 1.21.6 and Viewer 1.22

The LLEventPoll parser in Viewer 1.21.6 (and later) has further improvements in the viewer code in addition to supporting a "500" response.

Additional behavior: When the Apache2 server responds with a server error for the primary region's EventPoll (or, the EventPoll for a neighboring region) then newer viewers will retry the EventPoll connection up to 10 times, with a slightly increasing delay between attempts. During this time (up to 425 seconds), the viewer might not acquire any capabilities. However, on a successful re-try this situation is recovered.

Furthermore, after 10 continuous failed attempts (for over 425 seconds) on the primary EventPoll, these newer viewers make a determination that the EventPoll with the primary region has become unrecoverable. Viewer 1.22 (and later) notifies the user that his/her session has been unfortunately disconnected from the region, and causes the avatar to log out. At this point, a new login into Second Life is the only way to recover capabilities and restore functionality with the region.

Patches

If your viewer is based on the open source code of Viewer 1.21 or later, there are no patches that you need to implement.

The following patches are posted to VWR-12248. This is a minimum changeset if your viewer is based on the open source code of version 1.20.17 or earlier. PLEASE NOTE: These patches are provided as a convenience only and are NOT TESTED BY LINDEN LAB as a discrete set of changes to code.


  • linden-r96560.patch
    • QAR-825 DEV-18489 Event poll is brittle and doesn't parse status correctly
    • Files affected:
      • U linden/branches/viewer/viewer_1-21/indra/llcommon/CMakeLists.txt
      • A linden/branches/viewer/viewer_1-21/indra/llcommon/llhttpstatuscodes.h
      • U linden/branches/viewer/viewer_1-21/indra/llmessage/llhttpclient.cpp
      • U linden/branches/viewer/viewer_1-21/indra/llmessage/llurlrequest.cpp
      • U linden/branches/viewer/viewer_1-21/indra/llmessage/llurlrequest.h
      • U linden/branches/viewer/viewer_1-21/indra/newview/lleventpoll.cpp
  • linden-r99401.patch
    • DEV-21865 - Removed forceDisconnect call from LLEventPollResponder.
    • Files affected:
      • U linden/branches/viewer/viewer_1-21/indra/newview/lleventpoll.cpp
  • linden-r107540.patch
    • The fix is to handle 404 errors on the event poll quietly, rather than counting up the errors and eventually disconnecting.
    • add back the forceDisconnect call, but only for the main region and with a localizable message.
    • DEV-22203 - Reanabled the forceDisconnect call when the agent's main region event poll dies.
    • Files affected:
      • U linden/branches/viewer/viewer_1-22/indra/newview/lleventpoll.cpp