provide OSHttpRequest and OSHttpResponse to our REST handler.
also, this adds proper RestPlugin.IsGod() checking against the X-OpenSim-Godkey
HTTP request header.
last, i added XML doc comments to RestPlugin.cs
the "if (request.UserAgent != null)" branch in the wrong place: as a result BaseHttpServer would not do
anything if the user agent header field was present....ARGH! BAAAAAAD.
You sure can. This change set restores pants (and the rest of the
default appearance) in grid mode. The
root issue had to do with serializing multi-faced textures to the
grid server. This also restores the lookup path through the avatar
factory module, as that seems the reasonable place to have it live.
Some clean up patches are coming later as well, plus testing on
standalone, but this should be in a good kicking around state for
grid users.
Fixes a bug in BaseRequestHandler.
If the length of the patter is equal to, or greater than, the length of
the actual request path, then an exception is thrown. System using is
added to support use of String.Empty. Exception is used to ensure most
efficient operation on (assumed to be most common) successful case.
takes a look at the HTTP request header and retrieves x-opensim-godkey (if it exists)
and compares that against the godkey from OpenSim.ini.
also, this makes AddStreamHandler() virtual so that it can be overridden.
This patch adds an additional handler to the existing BaseHttpServer.
It does not affect any of the existing behaviors except insofar as the
new handler may be selected.
It is selected first because its Agent-oriented nature means that it
should not be pre-empted. The new handler type is defined by IHttpAgentHandler
in Framework/Servers and has two interface methods: Match and Handle.
The Match function returns a boolean result based upon examination of
information presented in the User-Agent header.
The Handle function expects to get the request and response instances
associated with the flow. The handler is responsible for ALL activity
associated with the request except in the event of an unhandled exception,
in which case the HandleAgentRequest routine will generate a 500 status
message and close the stream.
There are two immediateley apparent (and VERY easy to implement)
improvements that could be made:
1. The Match call could be allowed to operate over the entire
request context., rather than just agent identity.
2. The Handler could return a boolean indication of whether or not
the request was actually handled, and if not, the remaining handler
mechanism could take a shot at it. This would eliminate issues
arising from pre-empted streams.
enhancing IStreamHandler and IStreamedHandler interfaces so that OSHttp{Request,Response} get passed in,
allowing RestHandlers to set response status code, redirections, etc.
The money module witll register (claim) an interface slot,
even when disabled. This patch fixes it so that it will not
register to supply this interface unless it's activated.
Initialize() section that runs when the module is grabbing config data.
This is run before any Providers are created and thus makes sure we don't
get any more startup crashes.