//获取文件
            byte[] file = Helper.GetFile(RootDirectory + request.Path);
            if (file != null)
            {
                //支持Gzip已压缩数据ID
                file = gzip ? HttpHelper.CompressGZIP(file) : file;
                //获得pageHeader
                byte[] header = HttpHelper.GetHeader(file.Length, type, true, gzip);
                //构建完整的响应
                byte[] response = header.Concat(file);
                //创建响应
                output = new HttpResponse(response, request);
            }
            else
            {
                //file not found: return 404 response
                output = new HttpResponse(HttpHelper.GetHtml404Header(0, type), request);
            }
            return output;
        }

        /// <summary>
        /// 此功能检查,如果RawRequest收到来自浏览器的形成。
        /// </summary>
        /// <param name="e"></param>
        /// <param name="req"></param>
        /// <returns></returns>
        public static bool TryValidate(RawRequest e, out HttpRequest req)
        {
            HttpRequestType request = HttpRequestType.HttpPage;
            try
            {
                ///
                ///有很多的手法技巧在浏览器的HTTP请求中提取信息,
                /// 这个解决方案要求分割字符串和每个块analize。
                ///

                req = new HttpRequest(e);
                ///
                ///解码UTF8字符的字节,并要求分割字符串为“\ r\ N”
上一篇:ASP.net企业培训在线考试系统的设计与实现
下一篇:对我国《小企业会计准则》的思考和探索

C#+sqlserver大学生心理测试...

Linux系统下web服务器的搭建与设计

架设Linux(2.6内核)的服务器集群【745字】

使用http协议和winsockapi实现...

WEB服务器多框架解决方案【1450字】

浅谈网站服务器安全维护技巧【2595字】

小微商家移动互联进销存...

酵母菌发酵生产天然香料...

上海居民的社会参与研究

提高教育质量,构建大學生...

浅谈高校行政管理人员的...

STC89C52单片机NRF24L01的无线病房呼叫系统设计

AES算法GPU协处理下分组加...

压疮高危人群的标准化中...

从政策角度谈黑龙江對俄...

基于Joomla平台的计算机学院网站设计与开发

浅论职工思想政治工作茬...