Author: gnorton
Date: 2007-11-07 18:20:26 -0500 (Wed, 07 Nov 2007)
New Revision: 89174
Modified:
trunk/mcs/class/System/System.Net/ChangeLog
trunk/mcs/class/System/System.Net/ListenerAsyncResult.cs
Log:
2007-11-07 Geoff Norton <[EMAIL PROTECTED]>
* ListenerAsyncResult.cs: Only send the 401 header if our authentication
type is Basic or Negotiate (which we default to basic) because that is
all we support. Set the WWW-Authenticate header when we return a 401
result. Send the correct state object in the async result.
Modified: trunk/mcs/class/System/System.Net/ChangeLog
===================================================================
--- trunk/mcs/class/System/System.Net/ChangeLog 2007-11-07 23:12:48 UTC (rev
89173)
+++ trunk/mcs/class/System/System.Net/ChangeLog 2007-11-07 23:20:26 UTC (rev
89174)
@@ -1,3 +1,10 @@
+2007-11-07 Geoff Norton <[EMAIL PROTECTED]>
+
+ * ListenerAsyncResult.cs: Only send the 401 header if our authentication
+ type is Basic or Negotiate (which we default to basic) because that is
+ all we support. Set the WWW-Authenticate header when we return a 401
+ result. Send the correct state object in the async result.
+
2007-11-06 Geoff Norton <[EMAIL PROTECTED]>
* ListenerAsyncResult.cs: If the HttpListener has an authentication
Modified: trunk/mcs/class/System/System.Net/ListenerAsyncResult.cs
===================================================================
--- trunk/mcs/class/System/System.Net/ListenerAsyncResult.cs 2007-11-07
23:12:48 UTC (rev 89173)
+++ trunk/mcs/class/System/System.Net/ListenerAsyncResult.cs 2007-11-07
23:20:26 UTC (rev 89174)
@@ -82,11 +82,12 @@
if (handle != null)
handle.Set ();
- if (context.Listener.AuthenticationSchemes !=
AuthenticationSchemes.Anonymous && context.Request.Headers ["Authorization"] ==
null) {
+ if ((context.Listener.AuthenticationSchemes ==
AuthenticationSchemes.Basic || context.Listener.AuthenticationSchemes ==
AuthenticationSchemes.Negotiate) && context.Request.Headers ["Authorization"]
== null) {
context.Listener.EndGetContext (this);
context.Response.StatusCode = 401;
+ context.Response.Headers
["WWW-Authenticate"] = AuthenticationSchemes.Basic + "realm=\"\"";
context.Response.OutputStream.Close ();
- context.Listener.BeginGetContext (cb,
this);
+ context.Listener.BeginGetContext (cb,
state);
} else if (cb != null)
ThreadPool.QueueUserWorkItem
(InvokeCallback, this);
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches