Web/GZipHandler.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/**********************************************
* 类作用: 数据压缩类
* 建立人: abaal
* 建立时间: 2008-09-03
* Copyright (C) 2007-2008 abaal
* All rights reserved
* http://blog.csdn.net/abaal888
***********************************************/
using System;
using System.Web;
using System.IO;
using System.Text;
using System.IO.Compression;
using System.Text.RegularExpressions;
namespace Svnhost.Web
{
public class GZipHandler : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
HttpContext Context = HttpContext.Current;
HttpRequest Request = Context.Request;
HttpResponse Response = Context.Response;
string AcceptEncoding = Request.Headers["Accept-Encoding"];
// *** Start by checking whether GZip is supported by client
bool UseGZip = false;
if (!string.IsNullOrEmpty(AcceptEncoding) &&
AcceptEncoding.ToLower().IndexOf("gzip") > -1)
UseGZip = true;
// *** Create a cachekey and check whether it exists
string CacheKey = Request.QueryString.ToString() + UseGZip.ToString();
byte[] Output = Context.Cache[CacheKey] as byte[];
if (Output != null)
{
// *** Yup - read cache and send to client
SendOutput(Output, UseGZip);
return;
}
// *** Load the script file
string Script = "";
StreamReader sr = new StreamReader(context.Server.MapPath(Request["src"]));
Script = sr.ReadToEnd();
后面还有 85 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。