[prev in list] [next in list] [prev in thread] [next in thread] 

List:       zope-cvs
Subject:    [Zope-Checkins] SVN: Zope/trunk/ Make it possible to use WSGI
From:       Hanno Schlichting <hannosch () hannosch ! eu>
Date:       2011-10-31 22:07:56
Message-ID: 20111031220756.1D134B0F65 () cvs ! zope ! org
[Download RAW message or body]

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.

_______________________________________________
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic