Files
Testing/vidchat/wget.aspx.cs
sean 343b4a3f3f
Some checks are pending
deploy-testing / deploy (push) Waiting to run
Initial testing snapshot
2026-11-19 18:32:17 -05:00

24 lines
710 B
C#

using System;
using System.IO;
using System.Net;
namespace AVChat
{
public partial class wget : System.Web.UI.Page
{
string rsp = string.Empty;
protected void Page_Load(object sender, EventArgs e){
Response.AddHeader("Content-Type", "image/"+this.Request.Params["type"]);
System.Net.WebClient wc = new System.Net.WebClient();
bool result = Uri.TryCreate(Request.QueryString["url"], UriKind.RelativeOrAbsolute, out uriResult) && uriResult.Scheme == Uri.UriSchemeHttp;
if (result)
{
byte[] rsp = wc.DownloadData(Request.QueryString["url"]);
Response.BinaryWrite(rsp);
}
}
}
}