1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- using Nini.Config;
- using log4net;
- using System;
- using System.IO;
- using System.Reflection;
- using System.Net;
- using System.Text;
- using System.Text.RegularExpressions;
- using System.Xml;
- using System.Xml.Serialization;
- using OpenSim.Server.Base;
- using OpenSim.Services.Interfaces;
- using OpenSim.Framework;
- using OpenSim.Framework.ServiceAuth;
- using OpenSim.Framework.Servers.HttpServer;
- namespace OpenSim.Server.Handlers.BakedTextures
- {
- public class BakesServerGetHandler : BaseStreamHandler
- {
- private IBakedTextureService m_BakesService;
- private System.Text.UTF8Encoding utf8 =
- new System.Text.UTF8Encoding();
- public BakesServerGetHandler(IBakedTextureService service, IServiceAuth auth) :
- base("GET", "/bakes", auth)
- {
- m_BakesService = service;
- }
- protected override byte[] ProcessRequest(
- string path, Stream request, IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
- {
- string[] p = SplitParams(path);
- if (p.Length == 0)
- return new byte[0];
- return utf8.GetBytes(m_BakesService.Get(p[0]));
- }
- }
- }
|