+2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * SessionDictionary.cs: locking.
+
+ * SessionInProcHandler.cs: use the new method instead of the setter.
+
2003-07-01 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* ISessionHandler.cs:
internal void Clear ()
{
_dirty = true;
- BaseClear ();
+ lock (this)
+ BaseClear ();
}
internal string GetKey (int index)
{
- return BaseGetKey (index);
+ string value;
+ lock (this)
+ value = BaseGetKey (index);
+
+ return value;
}
internal static bool IsInmutable (object o)
internal void Remove (string s)
{
- BaseRemove (s);
+ lock (this)
+ BaseRemove (s);
_dirty = true;
}
internal void RemoveAt (int index)
{
- BaseRemoveAt (index);
+ lock (this)
+ BaseRemoveAt (index);
_dirty = true;
}
internal void Serialize (BinaryWriter w)
{
- w.Write (Count);
- foreach (string key in Keys) {
- w.Write (key);
- object value = BaseGet (key);
- if (value == null) {
- w.Write (16); // types.Count + 1
- continue;
- }
+ lock (this) {
+ w.Write (Count);
+ foreach (string key in Keys) {
+ w.Write (key);
+ object value = BaseGet (key);
+ if (value == null) {
+ w.Write (16); // types.Count + 1
+ continue;
+ }
- SerializeByType (w, value);
+ SerializeByType (w, value);
+ }
}
}
internal object this [string s]
{
- get { return BaseGet (s); }
+ get {
+ object o;
+ lock (this)
+ o = BaseGet (s);
+
+ return o;
+ }
+
set {
- BaseSet (s, value);
+ lock (this)
+ BaseSet (s, value);
+
_dirty = true;
}
}
public object this [int index]
{
- get { return BaseGet (index); }
+ get {
+ object o;
+ lock (this)
+ o = BaseGet (index);
+
+ return o;
+ }
set {
- BaseSet (index, value);
+ lock (this)
+ BaseSet (index, value);
+
_dirty = true;
}
}
// update the timestamp.
container.Touch ();
// Can we do this? It feels safe, but what do I know.
- context.Session = container.SessionState;
+ context.SetSession (container.SessionState);
return false; // and we're done
} else if(container!=null) {
//A empty or expired session, lets kill it.
_sessionTable [sessionID]=container;
// and returns it.
- context.Session = container.SessionState;
+ context.SetSession (container.SessionState);
context.Session.IsNewSession = true;
+2003-07-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
+
+ * HttpContext.cs: Session doesn't have a setter.
+
+ * HttpResponse.cs: Request is private.
+
2003-07-03 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* HttpRequest.cs: fixed Headers property. It was getting known headers
get {
return (HttpSessionState) _oSession;
}
-
- set {
- //FIXME: gotta remove set
- _oSession=value;
- }
}
public bool SkipAuthorization
}
}
+ internal void SetSession (HttpSessionState session)
+ {
+ _oSession = session;
+ }
+
public void AddError (Exception errorInfo)
{
if (_arrExceptions == null)