diff --git a/Teknik/Areas/Stream/Controllers/StreamController.cs b/Teknik/Areas/Stream/Controllers/StreamController.cs
index 3d4882c..5c5342f 100644
--- a/Teknik/Areas/Stream/Controllers/StreamController.cs
+++ b/Teknik/Areas/Stream/Controllers/StreamController.cs
@@ -24,46 +24,30 @@ namespace Teknik.Areas.Stream.Controllers
[AllowAnonymous]
public ActionResult ViewStream(int id)
{
- if (Config.StreamConfig.Enabled)
+ try
{
- if (id > 0 && id <= Config.StreamConfig.Sources.Count)
+ if (Config.StreamConfig.Enabled)
{
- // ID is valid, so let's get the stream
- string source = Config.StreamConfig.Sources[id - 1];
-
- System.IO.Stream stream = null;
-
- //This controls how many bytes to read at a time and send to the client
- int bytesToRead = 10000;
-
- // Buffer to read bytes in chunk size specified above
- byte[] buffer = new Byte[bytesToRead];
-
-
- try
+ if (id > 0 && id <= Config.StreamConfig.Sources.Count)
{
+ // ID is valid, so let's get the stream
+ string source = Config.StreamConfig.Sources[id - 1];
//Create a WebRequest to get the file
HttpWebRequest fileReq = (HttpWebRequest)HttpWebRequest.Create(source);
//Create a response for this request
HttpWebResponse fileResp = (HttpWebResponse)fileReq.GetResponse();
- if (fileReq.ContentLength > 0)
- fileResp.ContentLength = fileReq.ContentLength;
-
- //Get the Stream returned from the response
- stream = fileResp.GetResponseStream();
-
- return File(stream, "image/jpeg");
- }
- catch (Exception ex)
- {
- return Redirect(Url.SubRouteUrl("error", "Error.Http404"));
+ return File(fileResp.GetResponseStream(), fileResp.ContentType);
}
+ return Redirect(Url.SubRouteUrl("error", "Error.Http404"));
}
- return Redirect(Url.SubRouteUrl("error", "Error.Http404"));
+ return Redirect(Url.SubRouteUrl("error", "Error.Http403"));
+ }
+ catch (Exception ex)
+ {
+ return Redirect(Url.SubRouteUrl("error", "Error.Exception", new { exception = ex }));
}
- return Redirect(Url.SubRouteUrl("error", "Error.Http403"));
}
}
}
\ No newline at end of file
diff --git a/Teknik/Areas/Transparency/Views/Transparency/Index.cshtml b/Teknik/Areas/Transparency/Views/Transparency/Index.cshtml
index 23cdcdc..caf0482 100644
--- a/Teknik/Areas/Transparency/Views/Transparency/Index.cshtml
+++ b/Teknik/Areas/Transparency/Views/Transparency/Index.cshtml
@@ -250,6 +250,32 @@
}
}
+
+
+ -----BEGIN PGP SIGNED MESSAGE-----
+ Hash: SHA1
+
+ Beginning January 1st, 2014 until today, May 12, 2016, Teknik has not recieved a national security letter, FISA order, or any other classified request for user information.
+
+ This notice is valid until June 12, 2016.
+ -----BEGIN PGP SIGNATURE-----
+ Version: GnuPG v1
+
+ iQIcBAEBAgAGBQJXNCtdAAoJEP4EVManSeNwn/MP/04nujsrABZyJyoE0MCP+gk2
+ bKAwhQKsjv2UxP/eK2UD7E6W8B5uuMl9THYYQWZWkTYlGW2QWaeiI2jqwbAU5tWu
+ WpmsmaPGWErTM32cTdcqJQOO3eo8xc8y9KIIDWhrilIkIttDNbmKohvu7nbLgo4Q
+ r1ugDIcqu3J7TEueTik2tGNKuD7UyXH+mv+mkEp+FS7aqR9Ub7k4cDczTrVekoAv
+ Ux+ol9Vm/RCwLGB3orLiPU8jhU2aqMMHy4+s7jnuqTiEGNNyUULXhF0yclIytdQE
+ d2kDyQ1nnBCpuET9Y198e/1jQlxBHX0VCX0h6hE9BKk7s1y1B+WIt1fEgEdVHAn4
+ Cc+bkp4aPmVT4tvSnncP+Lqpj7yBwlbFI/m6W1oQ5m6WL9aVMoreWh/AkU+HmaMc
+ j4Hsjo3PuPOoaa4gcX8dQMSVtATsX1Hnnu3f0YNOZwb2UmYHe+FmaDdGryIp9qTw
+ oVDOV8q5VfjyDDOJ3VbhztOPA3jEoG4bsb2S5eLVCbFrGka1In81W141aq9Lgbv3
+ 5L8gUpiqcv6HEfbwkEU8EzfMryep764PHVvquWIjirKabiPC0TUQoqabndhLQ5Ix
+ onZCq5ObyeQxTrus/xjPogu2yZcboiydrav0J8PXwotvaVDUZmrGXuuqosQwfQ1T
+ HvABK7OR5ZLetP0Co5LR
+ =/G4U
+ -----END PGP SIGNATURE-----
+