X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2FSystem.Web%2FSystem.Web%2FHttpRequest.cs;h=8e9359a9f896d82618f25239529e50c3a0f90087;hb=889b71116d77b38125e67918397b39018f6e14b6;hp=d273f1cf1fdb7d7c3afa0de5240527a8ec6cae8c;hpb=ae3b35aa23f89afc78957b808ee8112b3670c8c7;p=mono.git diff --git a/mcs/class/System.Web/System.Web/HttpRequest.cs b/mcs/class/System.Web/System.Web/HttpRequest.cs index d273f1cf1fd..8e9359a9f89 100755 --- a/mcs/class/System.Web/System.Web/HttpRequest.cs +++ b/mcs/class/System.Web/System.Web/HttpRequest.cs @@ -39,6 +39,7 @@ using System.Runtime.InteropServices; using System.Security; using System.Security.Permissions; using System.Security.Principal; +using System.Threading; using System.Web.Configuration; using System.Web.Management; using System.Web.UI; @@ -980,6 +981,11 @@ namespace System.Web } } + public Stream GetBufferedInputStream () + { + return input_stream; + } + public Stream GetBufferlessInputStream () { if (bufferlessInputStream == null) { @@ -993,6 +999,11 @@ namespace System.Web return bufferlessInputStream; } + public Stream GetBufferlessInputStream (bool disableMaxRequestLength) + { + return GetBufferlessInputStream (); + } + // // Stream that returns the data as it is read, without buffering // @@ -1399,6 +1410,12 @@ namespace System.Web } } + public CancellationToken TimedOutToken { + get { + throw new NotImplementedException (); + } + } + public int TotalBytes { get { Stream ins = InputStream; @@ -1508,6 +1525,38 @@ namespace System.Web } public int [] MapImageCoordinates (string imageFieldName) + { + string[] parameters = GetImageCoordinatesParameters (imageFieldName); + if (parameters == null) + return null; + int [] result = new int [2]; + try { + result [0] = Int32.Parse (parameters [0]); + result [1] = Int32.Parse (parameters [1]); + } catch { + return null; + } + + return result; + } + + public double [] MapRawImageCoordinates (string imageFieldName) + { + string[] parameters = GetImageCoordinatesParameters (imageFieldName); + if (parameters == null) + return null; + double [] result = new double [2]; + try { + result [0] = Double.Parse (parameters [0]); + result [1] = Double.Parse (parameters [1]); + } catch { + return null; + } + + return result; + } + + string [] GetImageCoordinatesParameters (string imageFieldName) { string method = HttpMethod; NameValueCollection coll = null; @@ -1526,14 +1575,7 @@ namespace System.Web string y = coll [imageFieldName + ".y"]; if (y == null || y == "") return null; - - int [] result = new int [2]; - try { - result [0] = Int32.Parse (x); - result [1] = Int32.Parse (y); - } catch { - return null; - } + string[] result = new string [] { x, y }; return result; }