1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- using Nini.Config;
- using log4net;
- using System;
- using System.Reflection;
- using System.IO;
- 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 BakesServerPostHandler : BaseStreamHandler
- {
- private IBakedTextureService m_BakesService;
- public BakesServerPostHandler(IBakedTextureService service, IServiceAuth auth) :
- base("POST", "/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];
- }
- using(StreamReader sr = new StreamReader(request))
- m_BakesService.Store(p[0],sr.ReadToEnd());
- return new byte[0];
- }
- }
- }
|