mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Add additional SystemWeb HttpRequset properties to C# test stubs
This commit is contained in:
@@ -178,6 +178,37 @@ namespace System.Web
|
||||
public string RawUrl { get; set; }
|
||||
public HttpCookieCollection Cookies => null;
|
||||
public bool IsAuthenticated { get; set; }
|
||||
public NameValueCollection Form => null;
|
||||
public NameValueCollection Headers => null;
|
||||
public NameValueCollection Params => null;
|
||||
public string UserAgent(string s) => null;
|
||||
public string UrlReferrer(string s) => null;
|
||||
public NameValueCollection ServerVariables => null;
|
||||
// Default property that goes through the collections
|
||||
// QueryString, Form, Cookies, ClientCertificate and ServerVariables
|
||||
public String this[String key]
|
||||
{
|
||||
get
|
||||
{
|
||||
String s;
|
||||
|
||||
s = QueryString[key];
|
||||
if (s != null)
|
||||
return s;
|
||||
|
||||
s = Form[key];
|
||||
if (s != null)
|
||||
return s;
|
||||
|
||||
HttpCookie c = Cookies[key];
|
||||
if (c != null)
|
||||
return c.Value;
|
||||
|
||||
s = ServerVariables[key];
|
||||
if (s != null)
|
||||
return s;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class HttpRequestWrapper : System.Web.HttpRequestBase
|
||||
|
||||
Reference in New Issue
Block a user