Author: gonzalo
Date: 2006-03-20 12:23:44 -0500 (Mon, 20 Mar 2006)
New Revision: 58192
Modified:
trunk/mcs/class/System.Web/System.Web/HttpRequest.cs
Log:
rename method
Modified: trunk/mcs/class/System.Web/System.Web/HttpRequest.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web/HttpRequest.cs 2006-03-20
17:21:56 UTC (rev 58191)
+++ trunk/mcs/class/System.Web/System.Web/HttpRequest.cs 2006-03-20
17:23:44 UTC (rev 58192)
@@ -364,7 +364,8 @@
}
}
- static Stream StreamCopy (Stream stream)
+ // GetSubStream returns a 'copy' of the InputStream with
Position set to 0.
+ static Stream GetSubStream (Stream stream)
{
#if !TARGET_JVM
if (stream is IntPtrStream)
@@ -384,7 +385,7 @@
throw new NotSupportedException ("The stream is " +
stream.GetType ());
}
- static void EndStreamCopy (Stream stream)
+ static void EndSubStream (Stream stream)
{
if (stream is TempFileStream) {
((TempFileStream) stream).RestorePosition ();
@@ -400,7 +401,7 @@
if (boundary == null)
return;
- Stream input = StreamCopy (InputStream);
+ Stream input = GetSubStream (InputStream);
HttpMultipart multi_part = new HttpMultipart (input,
boundary, ContentEncoding);
HttpMultipart.Element e;
@@ -420,7 +421,7 @@
files.AddFile (e.Name, sub);
}
}
- EndStreamCopy (input);
+ EndSubStream (input);
}
//
@@ -440,7 +441,7 @@
//
void LoadWwwForm ()
{
- Stream input = StreamCopy (InputStream);
+ Stream input = GetSubStream (InputStream);
StreamReader s = new StreamReader (input,
ContentEncoding);
StringBuilder key = new StringBuilder ();
@@ -469,7 +470,7 @@
if (c == -1)
AddRawKeyValue (key, value);
- EndStreamCopy (input);
+ EndSubStream (input);
}
bool IsContentType (string ct, bool starts_with)
@@ -1215,7 +1216,7 @@
// More than 1 call to SaveAs works fine on MS, so we
"copy" the stream
// to keep InputStream in its state.
- Stream input = StreamCopy (InputStream);
+ Stream input = GetSubStream (InputStream);
try {
long len = input.Length;
int buf_size = (int) Math.Min ((len < 0 ? 0 :
len), 8192);
@@ -1228,7 +1229,7 @@
} finally {
output.Flush ();
output.Close ();
- EndStreamCopy (input);
+ EndSubStream (input);
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches