Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- else if (urlParts[0] == "pc")
- {
- var file = "pc/" + urlParts[1];
- if (urlParts[1] == "mp_playlists.txt")
- {
- var stream = File.OpenRead(file);
- rp.fs = stream;
- rp.Headers["Content-Type"] = "application/octet-stream";
- rp.status = (int)RespState.OK;
- }
- else if (urlParts[1] == "mp_playlists.ff")
- {
- var stream = File.OpenRead(file);
- rp.fs = stream;
- rp.Headers["Content-Type"] = "application/octet-stream";
- rp.status = (int)RespState.OK;
- }
- else
- {
- rp.status = (int)RespState.NOT_FOUND;
- rp.Headers["Content-Type"] = "text/plain";
- rp.BodyData = Encoding.ASCII.GetBytes("Not Found");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement