OpenSim
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Classes | Enumerations | Functions
Package OpenSim.Framework.Servers.HttpServer

Classes

class  BaseHTTPHandler
 
class  BaseHttpServer
 
class  HttpServerContextObj
 
class  HttpServerLogWriter
 Relays HttpServer log messages to our own logging mechanism. More...
 
class  BaseOutputStreamHandler
 Base handler for writing to an output stream More...
 
class  BaseRequestHandler
 
class  BaseStreamHandler
 Base streamed request handler. More...
 
class  BaseStreamHandlerBasicDOSProtector
 BaseStreamHandlerBasicDOSProtector Base streamed request handler. More...
 
class  BinaryStreamHandler
 
class  GenericHTTPDOSProtector
 
interface  IHttpAgentHandler
 
interface  IHttpServer
 Interface to OpenSimulator's built in HTTP server. Use this to register handlers (http, llsd, xmlrpc, etc.) for given URLs. More...
 
interface  IOSHttpRequest
 
interface  IOSHttpResponse
 
interface  IRequestHandler
 
interface  IStreamedRequestHandler
 
interface  IStreamHandler
 
interface  IGenericHTTPHandler
 
class  JsonRpcRequestManager
 Json rpc request manager. More...
 
class  ErrorCode
 
class  JsonRpcError
 
class  JsonRpcResponse
 
class  OSHttpHandler
 
class  OSHttpHttpHandler
 
class  OSHttpRequest
 
class  OSHttpRequestPump
 An OSHttpRequestPump fetches incoming OSHttpRequest objects from the OSHttpRequestQueue and feeds them to all subscribed parties. Each OSHttpRequestPump encapsulates one thread to do the work and there is a fixed number of pumps for each OSHttpServer object. More...
 
class  OSHttpRequestQueue
 OSHttpRequestQueues are used to hand over incoming HTTP requests to OSHttpRequestPump objects. More...
 
class  OSHttpResponse
 OSHttpResponse is the OpenSim representation of an HTTP response. More...
 
class  OSHttpServer
 OSHttpServer provides an HTTP server bound to a specific port. When instantiated with just address and port it uses normal HTTP, when instantiated with address, port, and X509 certificate, it uses HTTPS. More...
 
class  OSHttpXmlRpcHandler
 
class  PollServiceEventArgs
 
class  PollServiceHttpRequest
 
class  PollServiceHttpRequestComparer
 
class  PollServiceRequestManager
 
class  RestDeserialiseHandler< TRequest, TResponse >
 
class  RestHTTPHandler
 
class  RestObjectPoster
 Makes an asynchronous REST request which doesn't require us to do anything with the response. More...
 
class  RestObjectPosterResponse< TResponse >
 Makes an asynchronous REST request with a callback to invoke with the response. More...
 
class  RestSessionObject< TRequest >
 
class  SynchronousRestSessionObjectPoster< TRequest, TResponse >
 
class  RestSessionObjectPosterResponse< TRequest, TResponse >
 
class  RestDeserialiseSecureHandler< TRequest, TResponse >
 
class  RestDeserialiseTrustedHandler< TRequest, TResponse >
 
class  RestStreamHandler
 
class  WebSocketHttpServerHandler
 This class implements websockets. It grabs the network context from C::Webserver and utilizes it directly as a tcp streaming service More...
 
class  WebSocketReader
 Reads a byte stream and returns Websocket frames. More...
 
class  WebSocketFrame
 RFC6455 Websocket Frame More...
 
struct  WebsocketFrameHeader
 
class  WebsocketDataEventArgs
 
class  WebsocketTextEventArgs
 
class  PingEventArgs
 
class  PongEventArgs
 
class  RegularHttpRequestEvnetArgs
 
class  UpgradeCompletedEventArgs
 
class  UpgradeFailedEventArgs
 
class  CloseEventArgs
 
class  XmlRpcBasicDOSProtector
 

Enumerations

enum  OSHttpHandlerResult { OSHttpHandlerResult.Unprocessed, OSHttpHandlerResult.Pass, OSHttpHandlerResult.Done }
 
enum  OSHttpStatusCode : int {
  OSHttpStatusCode.InfoContinue = 100, OSHttpStatusCode.InfoSwitchingProtocols = 101, OSHttpStatusCode.SuccessOk = 200, OSHttpStatusCode.SuccessOkCreated = 201,
  OSHttpStatusCode.SuccessOkAccepted = 202, OSHttpStatusCode.SuccessOkNonAuthoritativeInformation = 203, OSHttpStatusCode.SuccessOkNoContent = 204, OSHttpStatusCode.SuccessOkResetContent = 205,
  OSHttpStatusCode.SuccessOkPartialContent = 206, OSHttpStatusCode.RedirectMultipleChoices = 300, OSHttpStatusCode.RedirectMovedPermanently = 301, OSHttpStatusCode.RedirectFound = 302,
  OSHttpStatusCode.RedirectSeeOther = 303, OSHttpStatusCode.RedirectNotModified = 304, OSHttpStatusCode.RedirectUseProxy = 305, OSHttpStatusCode.RedirectMovedTemporarily = 307,
  OSHttpStatusCode.ClientErrorBadRequest = 400, OSHttpStatusCode.ClientErrorUnauthorized = 401, OSHttpStatusCode.ClientErrorPaymentRequired = 402, OSHttpStatusCode.ClientErrorForbidden = 403,
  OSHttpStatusCode.ClientErrorNotFound = 404, OSHttpStatusCode.ClientErrorMethodNotAllowed = 405, OSHttpStatusCode.ClientErrorNotAcceptable = 406, OSHttpStatusCode.ClientErrorProxyAuthRequired = 407,
  OSHttpStatusCode.ClientErrorRequestTimeout = 408, OSHttpStatusCode.ClientErrorConflict = 409, OSHttpStatusCode.ClientErrorGone = 410, OSHttpStatusCode.ClientErrorLengthRequired = 411,
  OSHttpStatusCode.ClientErrorPreconditionFailed = 412, OSHttpStatusCode.ClientErrorRequestEntityToLarge = 413, OSHttpStatusCode.ClientErrorRequestURITooLong = 414, OSHttpStatusCode.ClientErrorUnsupportedMediaType = 415,
  OSHttpStatusCode.ClientErrorRequestRangeNotSatisfiable = 416, OSHttpStatusCode.ClientErrorExpectationFailed = 417, OSHttpStatusCode.ClientErrorPreconditionRequired = 428, OSHttpStatusCode.ClientErrorTooManyRequests = 429,
  OSHttpStatusCode.ClientErrorRequestHeaderFieldsTooLarge = 431, OSHttpStatusCode.ClientErrorJoker = 499, OSHttpStatusCode.ServerErrorInternalError = 500, OSHttpStatusCode.ServerErrorNotImplemented = 501,
  OSHttpStatusCode.ServerErrorBadGateway = 502, OSHttpStatusCode.ServerErrorServiceUnavailable = 503, OSHttpStatusCode.ServerErrorGatewayTimeout = 504, OSHttpStatusCode.ServerErrorHttpVersionNotSupported = 505,
  OSHttpStatusCode.ServerErrorNetworkAuthenticationRequired = 511
}
 HTTP status codes (almost) as defined by W3C in http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html and IETF in http://tools.ietf.org/html/rfc6585 More...
 

Functions

delegate string BinaryMethod (byte[] data, string path, string param)
 
delegate Hashtable GenericHTTPMethod (Hashtable request)
 
delegate bool JsonRPCMethod (OSDMap jsonRpcRequest, ref JsonRpcResponse response)
 
delegate OSD LLSDMethod (string path, OSD request, string endpoint)
 
delegate OSD DefaultLLSDMethod (OSD request, IPEndPoint client)
 
delegate OSD LLSDMethodString (OSD request, string thePath)
 
delegate bool OSHttpContentTypeChecker (OSHttpRequest req)
 An OSHttpHandler that matches on the "content-type" header can supply an OSHttpContentTypeChecker delegate which will be invoked by the request matcher in OSHttpRequestPump. More...
 
delegate XmlRpcResponse OSHttpHttpProcessor (XmlRpcRequest request)
 
delegate XmlRpcResponse OSHttpXmlRpcProcessor (XmlRpcRequest request)
 
delegate void RequestMethod (UUID requestID, Hashtable request)
 
delegate bool HasEventsMethod (UUID requestID, UUID pId)
 
delegate Hashtable GetEventsMethod (UUID requestID, UUID pId)
 
delegate Hashtable NoEventsMethod (UUID requestID, UUID pId)
 
delegate TResponse RestDeserialiseMethod< TRequest, TResponse > (TRequest request)
 
delegate string RestMethod (string request, string path, string param, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
 
delegate void ReturnResponse< T > (T reponse)
 
delegate bool CheckIdentityMethod (string sid, string aid)
 
delegate bool CheckTrustedSourceMethod (IPEndPoint peer)
 
delegate void DataDelegate (object sender, WebsocketDataEventArgs data)
 
delegate void TextDelegate (object sender, WebsocketTextEventArgs text)
 
delegate void PingDelegate (object sender, PingEventArgs pingdata)
 
delegate void PongDelegate (object sender, PongEventArgs pongdata)
 
delegate void RegularHttpRequestDelegate (object sender, RegularHttpRequestEvnetArgs request)
 
delegate void UpgradeCompletedDelegate (object sender, UpgradeCompletedEventArgs completeddata)
 
delegate void UpgradeFailedDelegate (object sender, UpgradeFailedEventArgs faileddata)
 
delegate void CloseDelegate (object sender, CloseEventArgs closedata)
 
delegate bool ValidateHandshake (string pWebOrigin, string pWebSocketKey, string pHost)
 
delegate XmlRpcResponse XmlRpcMethod (XmlRpcRequest request, IPEndPoint client)
 

Enumeration Type Documentation

<sumary> Any OSHttpHandler must return one of the following results:

result code meaning
Pass handler did not process the request</request>
Done handler did process the request, OSHttpServer can clean up and close the request</request>
Enumerator
Unprocessed 
Pass 
Done 

Definition at line 53 of file OSHttpHandler.cs.

HTTP status codes (almost) as defined by W3C in http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html and IETF in http://tools.ietf.org/html/rfc6585

Enumerator
InfoContinue 

100 Tells client that to keep on going sending its request

InfoSwitchingProtocols 

101 Server understands request, proposes to switch to different application level protocol

SuccessOk 

200 Request successful

SuccessOkCreated 

201 Request successful, new resource created

SuccessOkAccepted 

202 Request accepted, processing still on-going

SuccessOkNonAuthoritativeInformation 

203 Request successful, meta information not authoritative

SuccessOkNoContent 

204 Request successful, nothing to return in the body

SuccessOkResetContent 

205 Request successful, reset displayed content

SuccessOkPartialContent 

206 Request successful, partial content returned

RedirectMultipleChoices 

300 Redirect: different presentation forms available, take a pick

RedirectMovedPermanently 

301 Redirect: requested resource has moved and now lives somewhere else

RedirectFound 

302 Redirect: Resource temporarily somewhere else, location might change

RedirectSeeOther 

303 Redirect: See other as result of a POST

RedirectNotModified 

304 Redirect: Resource still the same as before

RedirectUseProxy 

305 Redirect: Resource must be accessed via proxy provided in location field

RedirectMovedTemporarily 

307 Redirect: Resource temporarily somewhere else, location might change

ClientErrorBadRequest 

400 Client error: bad request, server does not grok what the client wants

ClientErrorUnauthorized 

401 Client error: the client is not authorized, response provides WWW-Authenticate header field with a challenge

ClientErrorPaymentRequired 

402 Client error: Payment required (reserved for future use)

ClientErrorForbidden 

403 Client error: Server understood request, will not deliver, do not try again.

ClientErrorNotFound 

404 Client error: Server cannot find anything matching the client request.

ClientErrorMethodNotAllowed 

405 Client error: The method specified by the client in the request is not allowed for the resource requested

ClientErrorNotAcceptable 

406 Client error: Server cannot generate suitable response for the resource and content characteristics requested by the client

ClientErrorProxyAuthRequired 

407 Client error: Similar to 401, Server requests that client authenticate itself with the proxy first

ClientErrorRequestTimeout 

408 Client error: Server got impatient with client and decided to give up waiting for the client's request to arrive

ClientErrorConflict 

409 Client error: Server could not fulfill the request for a resource as there is a conflict with the current state of the resource but thinks client can do something about this

ClientErrorGone 

410 Client error: The resource has moved somewhere else, but server has no clue where.

ClientErrorLengthRequired 

411 Client error: The server is picky again and insists on having a content-length header field in the request

ClientErrorPreconditionFailed 

412 Client error: one or more preconditions supplied in the client's request is false

ClientErrorRequestEntityToLarge 

413 Client error: For fear of reflux, the server refuses to swallow that much data.

ClientErrorRequestURITooLong 

414 Client error: The server considers the Request-URI to be indecently long and refuses to even look at it.

ClientErrorUnsupportedMediaType 

415 Client error: The server has no clue about the media type requested by the client (contrary to popular belief it is not a warez server)

ClientErrorRequestRangeNotSatisfiable 

416 Client error: The requested range cannot be delivered by the server.

ClientErrorExpectationFailed 

417 Client error: The expectations of the client as expressed in one or more Expect header fields cannot be met by the server, the server is awfully sorry about this.

ClientErrorPreconditionRequired 

428 Client error :The 428 status code indicates that the origin server requires the request to be conditional.

ClientErrorTooManyRequests 

429 Client error: The 429 status code indicates that the user has sent too many requests in a given amount of time ("rate limiting").

ClientErrorRequestHeaderFieldsTooLarge 

431 Client error: The 431 status code indicates that the server is unwilling to process the request because its header fields are too large. The request MAY be resubmitted after reducing the size of the request header fields.

ClientErrorJoker 

499 Client error: Wildcard error.

ServerErrorInternalError 

500 Server error: something really strange and unexpected happened

ServerErrorNotImplemented 

501 Server error: The server does not do the functionality required to carry out the client request. not at all. certainly not before breakfast. but also not after breakfast.

ServerErrorBadGateway 

502 Server error: While acting as a proxy or a gateway, the server got ditched by the upstream server and as a consequence regretfully cannot fulfill the client's request

ServerErrorServiceUnavailable 

503 Server error: Due to unforseen circumstances the server cannot currently deliver the service requested. Retry-After header might indicate when to try again.

ServerErrorGatewayTimeout 

504 Server error: The server blames the upstream server for not being able to deliver the service requested and claims that the upstream server is too slow delivering the goods.

ServerErrorHttpVersionNotSupported 

505 Server error: The server does not support the HTTP version conveyed in the client's request.

ServerErrorNetworkAuthenticationRequired 

511 Server error: The 511 status code indicates that the client needs to authenticate to gain network access.

Definition at line 33 of file OSHttpStatusCodes.cs.

Function Documentation

delegate string OpenSim.Framework.Servers.HttpServer.BinaryMethod ( byte[]  data,
string  path,
string  param 
)
delegate bool OpenSim.Framework.Servers.HttpServer.CheckIdentityMethod ( string  sid,
string  aid 
)
delegate bool OpenSim.Framework.Servers.HttpServer.CheckTrustedSourceMethod ( IPEndPoint  peer)
delegate void OpenSim.Framework.Servers.HttpServer.CloseDelegate ( object  sender,
CloseEventArgs  closedata 
)

Here is the caller graph for this function:

delegate void OpenSim.Framework.Servers.HttpServer.DataDelegate ( object  sender,
WebsocketDataEventArgs  data 
)

Here is the caller graph for this function:

delegate OSD OpenSim.Framework.Servers.HttpServer.DefaultLLSDMethod ( OSD  request,
IPEndPoint  client 
)
delegate Hashtable OpenSim.Framework.Servers.HttpServer.GenericHTTPMethod ( Hashtable  request)
delegate Hashtable OpenSim.Framework.Servers.HttpServer.GetEventsMethod ( UUID  requestID,
UUID  pId 
)
delegate bool OpenSim.Framework.Servers.HttpServer.HasEventsMethod ( UUID  requestID,
UUID  pId 
)
delegate bool OpenSim.Framework.Servers.HttpServer.JsonRPCMethod ( OSDMap  jsonRpcRequest,
ref JsonRpcResponse  response 
)
delegate OSD OpenSim.Framework.Servers.HttpServer.LLSDMethod ( string  path,
OSD  request,
string  endpoint 
)

Here is the caller graph for this function:

delegate OSD OpenSim.Framework.Servers.HttpServer.LLSDMethodString ( OSD  request,
string  thePath 
)
delegate Hashtable OpenSim.Framework.Servers.HttpServer.NoEventsMethod ( UUID  requestID,
UUID  pId 
)
delegate bool OpenSim.Framework.Servers.HttpServer.OSHttpContentTypeChecker ( OSHttpRequest  req)

An OSHttpHandler that matches on the "content-type" header can supply an OSHttpContentTypeChecker delegate which will be invoked by the request matcher in OSHttpRequestPump.

Returns
true if the handler is interested in the content; false otherwise
delegate XmlRpcResponse OpenSim.Framework.Servers.HttpServer.OSHttpHttpProcessor ( XmlRpcRequest  request)
delegate XmlRpcResponse OpenSim.Framework.Servers.HttpServer.OSHttpXmlRpcProcessor ( XmlRpcRequest  request)
delegate void OpenSim.Framework.Servers.HttpServer.PingDelegate ( object  sender,
PingEventArgs  pingdata 
)

Here is the caller graph for this function:

delegate void OpenSim.Framework.Servers.HttpServer.PongDelegate ( object  sender,
PongEventArgs  pongdata 
)

Here is the caller graph for this function:

delegate void OpenSim.Framework.Servers.HttpServer.RegularHttpRequestDelegate ( object  sender,
RegularHttpRequestEvnetArgs  request 
)
delegate void OpenSim.Framework.Servers.HttpServer.RequestMethod ( UUID  requestID,
Hashtable  request 
)

Here is the caller graph for this function:

delegate TResponse OpenSim.Framework.Servers.HttpServer.RestDeserialiseMethod< TRequest, TResponse > ( TRequest  request)
delegate string OpenSim.Framework.Servers.HttpServer.RestMethod ( string  request,
string  path,
string  param,
IOSHttpRequest  httpRequest,
IOSHttpResponse  httpResponse 
)
delegate void OpenSim.Framework.Servers.HttpServer.ReturnResponse< T > ( reponse)
delegate void OpenSim.Framework.Servers.HttpServer.TextDelegate ( object  sender,
WebsocketTextEventArgs  text 
)

Here is the caller graph for this function:

delegate void OpenSim.Framework.Servers.HttpServer.UpgradeCompletedDelegate ( object  sender,
UpgradeCompletedEventArgs  completeddata 
)
delegate void OpenSim.Framework.Servers.HttpServer.UpgradeFailedDelegate ( object  sender,
UpgradeFailedEventArgs  faileddata 
)
delegate bool OpenSim.Framework.Servers.HttpServer.ValidateHandshake ( string  pWebOrigin,
string  pWebSocketKey,
string  pHost 
)
delegate XmlRpcResponse OpenSim.Framework.Servers.HttpServer.XmlRpcMethod ( XmlRpcRequest  request,
IPEndPoint  client 
)