Разработка распределенных приложений в Microsoft.NET Framework


         

IntPtr handle, long offset,


{
return string.Format("HTTP/{0}",
context.Request.ProtocolVersion.ToString());
}

public override string GetLocalAddress()
{
return context.Request.LocalEndPoint.Address.ToString();
}

public override int GetLocalPort()
{
return context.Request.LocalEndPoint.Port;
}

public override string GetQueryString()
{
return context.Request.Url.Query.TrimStart(new char[]{'?'});
}

public override string GetRawUrl()
{
return context.Request.RawUrl;
}

public override string GetRemoteAddress()
{
return context.Request.RemoteEndPoint.Address.ToString();
}

public override int GetRemotePort()
{
return context.Request.RemoteEndPoint.Port;
}

public override string GetUriPath()
{
return context.Request.Url.LocalPath;
}

public override void SendKnownResponseHeader(int index, string value)
{
context.Response.Headers[GetKnownResponseHeaderName(index)] = value;
}

public override void SendResponseFromMemory(byte[] data, int length)
{
context.Response.OutputStream.Write(data, 0, length);
}

public override void SendStatus(int statusCode, string statusDescription)
{
context.Response.StatusCode = statusCode;
context.Response.StatusDescription = statusDescription;
}

public override void SendUnknownResponseHeader(string name, string value)
{
context.Response.Headers[name] = value;
}

public override void SendResponseFromFile( IntPtr handle, long offset,
long length)
{
}

public override void SendResponseFromFile(string filename, long offset,
long length)
{
}
public override string GetAppPath()
{
return host.VirtualDir;
}

public override string GetAppPathTranslated()
{
return host.HostingDir;
}

public override string GetUnknownRequestHeader(string name)
{
return context.Request.Headers[name];
}

public override string GetKnownRequestHeader(int index)
{
switch (index)
{
case HeaderUserAgent:
return context.Request.UserAgent;
default:
return
context.Request.Headers[GetKnownRequestHeaderName(index)];
}

Содержание  Назад  Вперед