File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
csharp/ql/test/resources/stubs Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -178,6 +178,37 @@ public class HttpRequest
178178 public string RawUrl { get ; set ; }
179179 public HttpCookieCollection Cookies => null ;
180180 public bool IsAuthenticated { get ; set ; }
181+ public NameValueCollection Form => null ;
182+ public NameValueCollection Headers => null ;
183+ public NameValueCollection Params => null ;
184+ public string UserAgent ( string s ) => null ;
185+ public string UrlReferrer ( string s ) => null ;
186+ public NameValueCollection ServerVariables => null ;
187+ // Default property that goes through the collections
188+ // QueryString, Form, Cookies, ClientCertificate and ServerVariables
189+ public String this [ String key ]
190+ {
191+ get
192+ {
193+ String s ;
194+
195+ s = QueryString [ key ] ;
196+ if ( s != null )
197+ return s ;
198+
199+ s = Form [ key ] ;
200+ if ( s != null )
201+ return s ;
202+
203+ HttpCookie c = Cookies [ key ] ;
204+ if ( c != null )
205+ return c . Value ;
206+
207+ s = ServerVariables [ key ] ;
208+ if ( s != null )
209+ return s ;
210+ }
211+ }
181212 }
182213
183214 public class HttpRequestWrapper : System . Web . HttpRequestBase
You can’t perform that action at this time.
0 commit comments