[Zope-Checkins] SVN: Zope/trunk/ Make it possible to use WSGI without repoze.who.

Hanno Schlichting hannosch at hannosch.eu
Mon Oct 31 22:07:56 UTC 2011


Log message for revision 123219:
  Make it possible to use WSGI without repoze.who.
  

Changed:
  U   Zope/trunk/doc/CHANGES.rst
  U   Zope/trunk/src/ZPublisher/WSGIPublisher.py

-=-
Modified: Zope/trunk/doc/CHANGES.rst
===================================================================
--- Zope/trunk/doc/CHANGES.rst	2011-10-31 21:57:51 UTC (rev 123218)
+++ Zope/trunk/doc/CHANGES.rst	2011-10-31 22:07:55 UTC (rev 123219)
@@ -11,6 +11,8 @@
 Bugs Fixed
 ++++++++++
 
+- Make it possible to use WSGI without repoze.who.
+
 - Fixed serious authentication vulnerability in stock configuration.
 
 - Fixed a regression in webdav support that broke external editor feature.

Modified: Zope/trunk/src/ZPublisher/WSGIPublisher.py
===================================================================
--- Zope/trunk/src/ZPublisher/WSGIPublisher.py	2011-10-31 21:57:51 UTC (rev 123218)
+++ Zope/trunk/src/ZPublisher/WSGIPublisher.py	2011-10-31 22:07:55 UTC (rev 123219)
@@ -108,6 +108,9 @@
 
     def _unauthorized(self):
         self.setStatus(401)
+        realm = self.realm
+        if realm:
+            self.setHeader('WWW-Authenticate', 'basic realm="%s"' % realm, 1)
 
     def write(self,data):
         """ Add data to our output stream.



More information about the Zope-Checkins mailing list