Example #1
0
        public override void OnResponse(ref HTTPRequestStruct rq, ref HTTPResponseStruct rp)
        {
            // Path
            string path = Folder + rq.URL.Replace("/", @"\").Replace("%20", " ");

            // Create a Byte FileStream from the file;
            FileStream input = new FileStream(path, FileMode.Open);

            // Open the stream and read it;
            rp.Headers["Content-type"]   = "application / octet - stream";
            rp.Headers["Content-Length"] = input.Length.ToString();
            rp.fs = input;
        }
Example #2
0
 public abstract void OnResponse(ref HTTPRequestStruct rq, ref HTTPResponseStruct rp);