Author: gonzalo
Date: 2005-04-20 18:51:39 -0400 (Wed, 20 Apr 2005)
New Revision: 43365
Modified:
trunk/mcs/class/System.Web/System.Web/ChangeLog
trunk/mcs/class/System.Web/System.Web/HttpAsyncResult.cs
trunk/mcs/class/System.Web/System.Web/HttpBrowserCapabilities.cs
trunk/mcs/class/System.Web/System.Web/HttpCachePolicy.cs
trunk/mcs/class/System.Web/System.Web/HttpCacheVaryByHeaders.cs
trunk/mcs/class/System.Web/System.Web/HttpCacheVaryByParams.cs
trunk/mcs/class/System.Web/System.Web/HttpClientCertificate.cs
trunk/mcs/class/System.Web/System.Web/HttpException.cs
trunk/mcs/class/System.Web/System.Web/HttpRuntime.cs
trunk/mcs/class/System.Web/System.Web/HttpUtility.cs
trunk/mcs/class/System.Web/System.Web/QueueManager.cs
trunk/mcs/class/System.Web/System.Web/TimeoutManager.cs
Log:
2005-04-20 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
* HttpCachePolicy.cs:
* HttpAsyncResult.cs:
* HttpClientCertificate.cs:
* HttpException.cs:
* HttpRuntime.cs:
* HttpCacheVaryByHeaders.cs:
* HttpBrowserCapabilities.cs:
* HttpUtility.cs:
* HttpCacheVaryByParams.cs: no more warnings.
* QueueManager.cs: check for local connections with minLocalFreeThreads.
* TimeoutManager.cs: dispose the timer when the finalizer is called.
Modified: trunk/mcs/class/System.Web/System.Web/ChangeLog
===================================================================
--- trunk/mcs/class/System.Web/System.Web/ChangeLog 2005-04-20 22:21:51 UTC
(rev 43364)
+++ trunk/mcs/class/System.Web/System.Web/ChangeLog 2005-04-20 22:51:39 UTC
(rev 43365)
@@ -1,3 +1,18 @@
+2005-04-20 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
+
+ * HttpCachePolicy.cs:
+ * HttpAsyncResult.cs:
+ * HttpClientCertificate.cs:
+ * HttpException.cs:
+ * HttpRuntime.cs:
+ * HttpCacheVaryByHeaders.cs:
+ * HttpBrowserCapabilities.cs:
+ * HttpUtility.cs:
+ * HttpCacheVaryByParams.cs: no more warnings.
+
+ * QueueManager.cs: check for local connections with minLocalFreeThreads.
+ * TimeoutManager.cs: dispose the timer when the finalizer is called.
+
2005-04-19 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
* ServerVariablesCollection.cs: shuffled variables, added missing ones
Modified: trunk/mcs/class/System.Web/System.Web/HttpAsyncResult.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web/HttpAsyncResult.cs 2005-04-20
22:21:51 UTC (rev 43364)
+++ trunk/mcs/class/System.Web/System.Web/HttpAsyncResult.cs 2005-04-20
22:51:39 UTC (rev 43365)
@@ -32,13 +32,11 @@
{
internal class HttpAsyncResult : IAsyncResult
{
- private object _result;
private object _asyncState;
private AsyncCallback _callback;
- private Exception _error;
-
private bool _ready;
private bool _readySync;
+ private Exception _error;
internal HttpAsyncResult(AsyncCallback callback, object state) {
_callback = callback;
@@ -48,8 +46,7 @@
internal void Complete(bool sync, object result, Exception
error) {
_ready = true;
_readySync = sync;
- _result = result;
- _error = error;
+ _error = error;
if (null != _callback) {
_callback(this);
}
@@ -57,7 +54,7 @@
internal Exception Error {
get {
- return null;
+ return _error;
}
}
@@ -67,12 +64,6 @@
}
}
- public object AsyncObject {
- get {
- return null;
- }
- }
-
public WaitHandle AsyncWaitHandle {
get {
return null;
Modified: trunk/mcs/class/System.Web/System.Web/HttpBrowserCapabilities.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web/HttpBrowserCapabilities.cs
2005-04-20 22:21:51 UTC (rev 43364)
+++ trunk/mcs/class/System.Web/System.Web/HttpBrowserCapabilities.cs
2005-04-20 22:51:39 UTC (rev 43365)
@@ -43,24 +43,24 @@
const int HaveBeta = 4;
const int HaveBrowser = 5;
const int HaveCDF = 6;
- const int HaveClrVersion = 7;
+ //const int HaveClrVersion = 7;
const int HaveCookies = 8;
const int HaveCrawler = 9;
- const int HaveEcmaScriptVersion = 10;
+ //const int HaveEcmaScriptVersion = 10;
const int HaveFrames = 11;
const int HaveJavaApplets = 12;
const int HaveJavaScript = 13;
const int HaveMajorVersion = 14;
const int HaveMinorVersion = 15;
- const int HaveMSDomVersion = 16;
+ //const int HaveMSDomVersion = 16;
const int HavePlatform = 17;
const int HaveTables = 18;
- const int HaveTagWriter = 19;
+ //const int HaveTagWriter = 19;
const int HaveVBScript = 20;
const int HaveVersion = 21;
- const int HaveW3CDomVersion = 22;
+ //const int HaveW3CDomVersion = 22;
const int HaveWin16 = 23;
- const int HaveWin32 = 24;
+ //const int HaveWin32 = 24;
int flags;
bool activeXControls;
@@ -72,19 +72,19 @@
Version clrVersion;
bool cookies;
bool crawler;
- Version ecmaScriptVersion;
+ //Version ecmaScriptVersion;
bool frames;
bool javaApplets;
bool javaScript;
int majorVersion;
double minorVersion;
- Version msDomVersion;
+ //Version msDomVersion;
string platform;
bool tables;
- Type tagWriter;
+ //Type tagWriter;
bool vbscript;
string version;
- Version w3CDomVersion;
+ //Version w3CDomVersion;
bool win16;
Version [] clrVersions;
internal string useragent;
Modified: trunk/mcs/class/System.Web/System.Web/HttpCachePolicy.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web/HttpCachePolicy.cs 2005-04-20
22:21:51 UTC (rev 43364)
+++ trunk/mcs/class/System.Web/System.Web/HttpCachePolicy.cs 2005-04-20
22:51:39 UTC (rev 43365)
@@ -66,13 +66,13 @@
DateTime expireDate;
bool haveLastModified;
DateTime lastModified;
- bool lastModifiedFromFileDependencies;
- bool noServerCaching;
- bool noStore;
- bool noTransforms;
+ //bool lastModifiedFromFileDependencies;
+ //bool noServerCaching;
+ //bool noStore;
+ //bool noTransforms;
HttpCacheRevalidation revalidation;
bool slidingSpiration;
- bool validUntilExpires;
+ //bool validUntilExpires;
string varyByCustom;
bool haveMaxAge;
TimeSpan maxAge;
@@ -210,9 +210,10 @@
lastModified = date;
}
+ [MonoTODO]
public void SetLastModifiedFromFileDependencies ()
{
- lastModifiedFromFileDependencies = true;
+ //lastModifiedFromFileDependencies = true;
}
public void SetMaxAge (TimeSpan date)
@@ -227,19 +228,22 @@
haveMaxAge = true;
}
+ [MonoTODO]
public void SetNoServerCaching ()
{
- noServerCaching = true;
+ //noServerCaching = true;
}
+ [MonoTODO]
public void SetNoStore ()
{
- noStore = true;
+ //noStore = true;
}
+ [MonoTODO]
public void SetNoTransforms ()
{
- noTransforms = true;
+ //noTransforms = true;
}
public void SetProxyMaxAge (TimeSpan delta)
@@ -268,9 +272,10 @@
slidingExpiration = slide;
}
+ [MonoTODO]
public void SetValidUntilExpires (bool validUntilExpires)
{
- this.validUntilExpires = validUntilExpires;
+ //this.validUntilExpires = validUntilExpires;
}
public void SetVaryByCustom (string custom)
Modified: trunk/mcs/class/System.Web/System.Web/HttpCacheVaryByHeaders.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web/HttpCacheVaryByHeaders.cs
2005-04-20 22:21:51 UTC (rev 43364)
+++ trunk/mcs/class/System.Web/System.Web/HttpCacheVaryByHeaders.cs
2005-04-20 22:51:39 UTC (rev 43365)
@@ -31,7 +31,6 @@
namespace System.Web {
public sealed class HttpCacheVaryByHeaders {
private Hashtable _Items;
- private bool _Dirty;
private bool _Wildcard;
// TODO: We need internal methods here to communicate with CachePolicy
@@ -40,7 +39,6 @@
}
public void VaryByUnspecifiedParameters() {
- _Dirty = true;
_Wildcard = true;
_Items = null;
}
@@ -81,8 +79,6 @@
return;
}
- _Dirty = true;
-
if (header == "*") {
VaryByUnspecifiedParameters();
return;
Modified: trunk/mcs/class/System.Web/System.Web/HttpCacheVaryByParams.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web/HttpCacheVaryByParams.cs
2005-04-20 22:21:51 UTC (rev 43364)
+++ trunk/mcs/class/System.Web/System.Web/HttpCacheVaryByParams.cs
2005-04-20 22:51:39 UTC (rev 43365)
@@ -34,7 +34,6 @@
private Hashtable _Items;
private bool _IgnoreParams;
private bool _Wildcard;
- private bool _Dirty;
// TODO: We need internal methods here to communicate with CachePolicy
@@ -51,7 +50,6 @@
return;
}
- _Dirty = true;
_IgnoreParams = value;
}
}
@@ -103,8 +101,6 @@
return;
}
- _Dirty = true;
-
if (header == "*") {
_Wildcard = true;
_Items = null;
Modified: trunk/mcs/class/System.Web/System.Web/HttpClientCertificate.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web/HttpClientCertificate.cs
2005-04-20 22:21:51 UTC (rev 43364)
+++ trunk/mcs/class/System.Web/System.Web/HttpClientCertificate.cs
2005-04-20 22:51:39 UTC (rev 43365)
@@ -32,7 +32,7 @@
namespace System.Web {
[MonoTODO()]
public class HttpClientCertificate : NameValueCollection {
- private HttpContext _Context;
+ //private HttpContext _Context;
private byte [] _BinaryIssuer;
private int _CertEncoding;
private byte [] _Certificate;
@@ -52,7 +52,7 @@
[MonoTODO("Decode ceritificate from Server variables.. CGI standard?")]
internal HttpClientCertificate(HttpContext Context) {
- _Context = Context;
+ //_Context = Context; not used
_Flags = 0;
}
Modified: trunk/mcs/class/System.Web/System.Web/HttpException.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web/HttpException.cs 2005-04-20
22:21:51 UTC (rev 43364)
+++ trunk/mcs/class/System.Web/System.Web/HttpException.cs 2005-04-20
22:51:39 UTC (rev 43365)
@@ -45,8 +45,6 @@
public class HttpException : ExternalException
{
int http_code = 500;
- int hr;
- string fileName;
public HttpException () : base ()
{
@@ -79,15 +77,13 @@
}
#endif
- public HttpException (int iHttpCode, string sMessage, int iHR)
: base (sMessage)
+ public HttpException (int iHttpCode, string sMessage, int iHR)
: base (sMessage, iHR)
{
http_code = iHttpCode;
- hr = iHR;
}
- public HttpException (string sMessage, int iHR) : base
(sMessage)
+ public HttpException (string sMessage, int iHR) : base
(sMessage, iHR)
{
- hr = iHR;
}
public HttpException (int iHttpCode,
@@ -98,13 +94,6 @@
http_code = iHttpCode;
}
- internal HttpException (string message, string fileName)
- : base (message)
- {
- this.fileName = fileName;
-
- }
-
public string GetHtmlErrorMessage ()
{
if (!(this.InnerException is HtmlizedException))
Modified: trunk/mcs/class/System.Web/System.Web/HttpRuntime.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web/HttpRuntime.cs 2005-04-20
22:21:51 UTC (rev 43364)
+++ trunk/mcs/class/System.Web/System.Web/HttpRuntime.cs 2005-04-20
22:51:39 UTC (rev 43365)
@@ -64,7 +64,7 @@
private WaitCallback unloadDomainCallback;
private bool _firstRequestStarted;
- private bool _firstRequestExecuted;
+ //private bool _firstRequestExecuted;
private Exception _initError;
private TimeoutManager timeoutManager;
@@ -121,8 +121,10 @@
throw _initError;
}
+ /* Not used
private void OnFirstRequestEnd() {
}
+ */
private void OnHandlerReady(IAsyncResult ar) {
HttpContext context = (HttpContext) ar.AsyncState;
Modified: trunk/mcs/class/System.Web/System.Web/HttpUtility.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web/HttpUtility.cs 2005-04-20
22:21:51 UTC (rev 43364)
+++ trunk/mcs/class/System.Web/System.Web/HttpUtility.cs 2005-04-20
22:51:39 UTC (rev 43365)
@@ -40,8 +40,6 @@
#region Fields
- const string _hex = "0123456789ABCDEF";
- const string _chars = "<>;:.?=&@*+%/\\";
static Hashtable entities;
static object lock_ = new object ();
Modified: trunk/mcs/class/System.Web/System.Web/QueueManager.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web/QueueManager.cs 2005-04-20
22:21:51 UTC (rev 43364)
+++ trunk/mcs/class/System.Web/System.Web/QueueManager.cs 2005-04-20
22:51:39 UTC (rev 43365)
@@ -53,20 +53,20 @@
queue = new Queue (queueLimit);
}
- // TODO: handle local connections, just check for 127.0.0.1
- bool CanExecuteRequest ()
+ bool CanExecuteRequest (HttpWorkerRequest req)
{
if (disposing)
return false;
int threads, cports;
ThreadPool.GetAvailableThreads (out threads, out
cports);
- return (threads > minFree); // || (local && threads >
minLocalFree);
+ bool local = (req.GetLocalAddress () == "127.0.0.1");
+ return (threads > minFree) || (local && threads >
minLocalFree);
}
public HttpWorkerRequest GetNextRequest (HttpWorkerRequest req)
{
- if (!CanExecuteRequest ()) {
+ if (!CanExecuteRequest (req)) {
if (req != null) {
lock (queue) {
Queue (req);
Modified: trunk/mcs/class/System.Web/System.Web/TimeoutManager.cs
===================================================================
--- trunk/mcs/class/System.Web/System.Web/TimeoutManager.cs 2005-04-20
22:21:51 UTC (rev 43364)
+++ trunk/mcs/class/System.Web/System.Web/TimeoutManager.cs 2005-04-20
22:51:39 UTC (rev 43365)
@@ -122,6 +122,12 @@
thread.Abort (new StepTimeout ());
}
}
+
+ ~TimeoutManager ()
+ {
+ if (timer != null)
+ timer.Dispose ();
+ }
}
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches