Files
Testing/vidchat/wget.aspx.cs
sean 0e8a8b3028
Some checks are pending
deploy-testing / deploy (push) Waiting to run
Initial testing snapshot
2026-11-17 16:15:01 -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);
}
}
}
}