<br><font size=2 face="sans-serif">This is not intended to imply anything
about the long-term strategy for BaseHttpServer, rather it offers a tactical
solution that addresses a specific need that those of us trying to implement
REST interfaces have today.</font>
<br>
<br><font size=2 face="sans-serif">As REST becomes more prevalent, there
is a growing need to accommodate it, and its special requirements, in BaseHttpServer.
I'd like to suggest that we do so by incorporating the notion of a User-Agent
sensitive handler. The handler is registered using the name of the User-Agent
it intends to support. This handler receives both request and response
objects and returns nothing (to BaseHttpServer), i.e. it is wholly responsible
for header management and everything else, as is the nature of REST. Along
the way we might want to implement some generic REST support to make implementing
handlers easier, but it is not required. A generic handler might take care
of "hiding" the request and response packets in the way that
Stefan has suggested.</font>
<br>
<br><font size=2 face="sans-serif">I have a version of BaseHttpServer which
incorporates these ideas without affecting any traffic not associated with
the specific user agents being targeted. Note that the idea here is not
to provide agent handlers for common agents such as Firefox, but rather
to insulate traffic from a functionally specific agent from conflicts with
other generic flows; REST is just one beneficiary.</font>
<br>
<br><font size=2 face="sans-serif">I have attached a patch that illustrates
the changes I'm talking about.</font>
<br>
<br>
<br>
<br><font size=2 face="sans-serif">Thoughts? You can incorporate the change
without affecting the way that OpenSim works today, and only if you add
and agent for a specific client, does anything change. The client dictionary
uses its keys to detect duplicate entries, but the actual matching can
be arbitrarily complex. In fact, what if we allowed an agent to match based
upon an arbitrary examination of the request headers?</font>
<br><font size=2 face="sans-serif"><br>
Best regards<br>
Alan<br>
-------------------<br>
T.J. Watson Research Center, Hawthorne, NY<br>
1-914-784-7286<br>
alan_webb@us.ibm.com</font>