# HG changeset patch # User Paul Boddie # Date 1246921975 -7200 # Node ID 28844d7a5ffb7841a2d727059c78cd26a159c37d # Parent 56b405d5a872b620a581012f4a0970a1ac462266 Added a content_type attribute on Transaction instances. Updated release information. diff -r 56b405d5a872 -r 28844d7a5ffb README.txt --- a/README.txt Sat Mar 21 00:34:24 2009 +0100 +++ b/README.txt Tue Jul 07 01:12:55 2009 +0200 @@ -79,6 +79,8 @@ WebStack.Resources.Selectors. * Added a filename attribute to FileContent instances, provided for file upload parameters. + * Made content_type an attribute of Transaction instances, always indicating + the set content type for responses. New in WebStack 1.2.7 (Changes since WebStack 1.2.6) ---------------------------------------------------- diff -r 56b405d5a872 -r 28844d7a5ffb WebStack/BaseHTTPRequestHandler.py --- a/WebStack/BaseHTTPRequestHandler.py Sat Mar 21 00:34:24 2009 +0100 +++ b/WebStack/BaseHTTPRequestHandler.py Tue Jul 07 01:12:55 2009 +0200 @@ -3,7 +3,7 @@ """ BaseHTTPRequestHandler classes. -Copyright (C) 2004, 2005, 2006, 2007 Paul Boddie +Copyright (C) 2004, 2005, 2006, 2007, 2009 Paul Boddie This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -454,17 +454,11 @@ self.headers_out[header] = value - def set_content_type(self, content_type): - - """ - Sets the 'content_type' for the response. - """ + # set_content_type(self, content_type) not reimplemented - # The content type has to be written as a header, before actual content, - # but after the response line. This means that some kind of buffering is - # required. Hence, we don't write the header out immediately. - - self.content_type = content_type + # The content type has to be written as a header, before actual content, + # but after the response line. This means that some kind of buffering is + # required. Hence, we don't write the header out immediately. # Higher level response-related methods. diff -r 56b405d5a872 -r 28844d7a5ffb WebStack/CGI.py --- a/WebStack/CGI.py Sat Mar 21 00:34:24 2009 +0100 +++ b/WebStack/CGI.py Tue Jul 07 01:12:55 2009 +0200 @@ -3,7 +3,7 @@ """ CGI classes. -Copyright (C) 2004, 2005, 2006, 2007 Paul Boddie +Copyright (C) 2004, 2005, 2006, 2007, 2009 Paul Boddie This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -438,17 +438,11 @@ self.headers_out[header] = value - def set_content_type(self, content_type): - - """ - Sets the 'content_type' for the response. - """ + # set_content_type(self, content_type) not reimplemented - # The content type has to be written as a header, before actual content, - # but after the response line. This means that some kind of buffering is - # required. Hence, we don't write the header out immediately. - - self.content_type = content_type + # The content type has to be written as a header, before actual content, + # but after the response line. This means that some kind of buffering is + # required. Hence, we don't write the header out immediately. # Higher level response-related methods. diff -r 56b405d5a872 -r 28844d7a5ffb WebStack/Django.py --- a/WebStack/Django.py Sat Mar 21 00:34:24 2009 +0100 +++ b/WebStack/Django.py Tue Jul 07 01:12:55 2009 +0200 @@ -3,7 +3,7 @@ """ Django classes. -Copyright (C) 2006, 2007 Paul Boddie +Copyright (C) 2006, 2007, 2009 Paul Boddie This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -407,7 +407,7 @@ Sets the 'content_type' for the response. """ - self.content_type = content_type + WebStack.Generic.Transaction.set_content_type(self, content_type) self.response.headers["Content-Type"] = str(content_type) # Higher level response-related methods. diff -r 56b405d5a872 -r 28844d7a5ffb WebStack/Generic.py --- a/WebStack/Generic.py Sat Mar 21 00:34:24 2009 +0100 +++ b/WebStack/Generic.py Tue Jul 07 01:12:55 2009 +0200 @@ -3,7 +3,7 @@ """ Generic Web framework interfaces. -Copyright (C) 2004, 2005, 2006 Paul Boddie +Copyright (C) 2004, 2005, 2006, 2009 Paul Boddie This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -559,7 +559,7 @@ Sets the 'content_type' for the response. """ - raise NotImplementedError, "set_content_type" + self.content_type = content_type # Higher level response-related methods. diff -r 56b405d5a872 -r 28844d7a5ffb WebStack/JavaServlet.py --- a/WebStack/JavaServlet.py Sat Mar 21 00:34:24 2009 +0100 +++ b/WebStack/JavaServlet.py Tue Jul 07 01:12:55 2009 +0200 @@ -3,7 +3,7 @@ """ Java Servlet classes. -Copyright (C) 2004, 2005, 2006, 2007 Paul Boddie +Copyright (C) 2004, 2005, 2006, 2007, 2009 Paul Boddie This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -498,6 +498,7 @@ Sets the 'content_type' for the response. """ + WebStack.Generic.Transaction.set_content_type(self, content_type) self.response.setContentType(str(content_type)) # Higher level response-related methods. diff -r 56b405d5a872 -r 28844d7a5ffb WebStack/ModPython.py --- a/WebStack/ModPython.py Sat Mar 21 00:34:24 2009 +0100 +++ b/WebStack/ModPython.py Tue Jul 07 01:12:55 2009 +0200 @@ -3,7 +3,7 @@ """ mod_python classes. -Copyright (C) 2004, 2005, 2006, 2007 Paul Boddie +Copyright (C) 2004, 2005, 2006, 2007, 2009 Paul Boddie This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -426,7 +426,7 @@ # Remember the content type for encoding purposes later. - self.content_type = content_type + WebStack.Generic.Transaction.set_content_type(self, content_type) self.trans.content_type = str(content_type) # Higher level response-related methods. diff -r 56b405d5a872 -r 28844d7a5ffb WebStack/Twisted.py --- a/WebStack/Twisted.py Sat Mar 21 00:34:24 2009 +0100 +++ b/WebStack/Twisted.py Tue Jul 07 01:12:55 2009 +0200 @@ -3,7 +3,7 @@ """ Twisted classes. -Copyright (C) 2004, 2005, 2006, 2007 Paul Boddie +Copyright (C) 2004, 2005, 2006, 2007, 2009 Paul Boddie This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -424,7 +424,7 @@ # Remember the content type for encoding purposes later. - self.content_type = content_type + WebStack.Generic.Transaction.set_content_type(self, content_type) self.trans.setHeader("Content-Type", str(content_type)) # Higher level response-related methods. diff -r 56b405d5a872 -r 28844d7a5ffb WebStack/WSGI.py --- a/WebStack/WSGI.py Sat Mar 21 00:34:24 2009 +0100 +++ b/WebStack/WSGI.py Tue Jul 07 01:12:55 2009 +0200 @@ -3,7 +3,7 @@ """ WSGI classes. -Copyright (C) 2004, 2005, 2006, 2007 Paul Boddie +Copyright (C) 2004, 2005, 2006, 2007, 2009 Paul Boddie This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -442,17 +442,11 @@ self.headers_out[header] = value - def set_content_type(self, content_type): - - """ - Sets the 'content_type' for the response. - """ + # set_content_type(self, content_type) not reimplemented - # The content type has to be written as a header, before actual content, - # but after the response line. This means that some kind of buffering is - # required. Hence, we don't write the header out immediately. - - self.content_type = content_type + # The content type has to be written as a header, before actual content, + # but after the response line. This means that some kind of buffering is + # required. Hence, we don't write the header out immediately. # Higher level response-related methods. diff -r 56b405d5a872 -r 28844d7a5ffb WebStack/Webware.py --- a/WebStack/Webware.py Sat Mar 21 00:34:24 2009 +0100 +++ b/WebStack/Webware.py Tue Jul 07 01:12:55 2009 +0200 @@ -3,7 +3,7 @@ """ Webware classes. -Copyright (C) 2004, 2005, 2006, 2007 Paul Boddie +Copyright (C) 2004, 2005, 2006, 2007, 2009 Paul Boddie This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -439,7 +439,7 @@ # Remember the content type for encoding purposes later. - self.content_type = content_type + WebStack.Generic.Transaction.set_content_type(self, content_type) return self.trans.response().setHeader("Content-Type", str(content_type)) # Higher level response-related methods. diff -r 56b405d5a872 -r 28844d7a5ffb WebStack/Zope.py --- a/WebStack/Zope.py Sat Mar 21 00:34:24 2009 +0100 +++ b/WebStack/Zope.py Tue Jul 07 01:12:55 2009 +0200 @@ -3,7 +3,7 @@ """ Zope classes. -Copyright (C) 2004, 2005, 2006, 2007 Paul Boddie +Copyright (C) 2004, 2005, 2006, 2007, 2009 Paul Boddie This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -414,7 +414,7 @@ Sets the 'content_type' for the response. """ - self.content_type = content_type + WebStack.Generic.Transaction.set_content_type(self, content_type) self.response.setHeader("Content-Type", str(content_type)) # Higher level response-related methods. diff -r 56b405d5a872 -r 28844d7a5ffb packages/ubuntu-feisty/jython-webstack/debian/changelog --- a/packages/ubuntu-feisty/jython-webstack/debian/changelog Sat Mar 21 00:34:24 2009 +0100 +++ b/packages/ubuntu-feisty/jython-webstack/debian/changelog Tue Jul 07 01:12:55 2009 +0200 @@ -31,8 +31,10 @@ WebStack.Resources.Selectors. * Added a filename attribute to FileContent instances, provided for file upload parameters. + * Made content_type an attribute of Transaction instances, + always indicating the set content type for responses. - -- Paul Boddie Sat, 15 Nov 2008 02:27:03 +0100 + -- Paul Boddie Tue, 07 Jul 2009 01:11:25 +0200 webstack (1.2.7-0ubuntu1) feisty; urgency=low diff -r 56b405d5a872 -r 28844d7a5ffb packages/ubuntu-feisty/python-webstack/debian/changelog --- a/packages/ubuntu-feisty/python-webstack/debian/changelog Sat Mar 21 00:34:24 2009 +0100 +++ b/packages/ubuntu-feisty/python-webstack/debian/changelog Tue Jul 07 01:12:55 2009 +0200 @@ -31,8 +31,10 @@ WebStack.Resources.Selectors. * Added a filename attribute to FileContent instances, provided for file upload parameters. + * Made content_type an attribute of Transaction instances, + always indicating the set content type for responses. - -- Paul Boddie Sat, 15 Nov 2008 02:26:43 +0100 + -- Paul Boddie Tue, 07 Jul 2009 01:11:44 +0200 webstack (1.2.7-0ubuntu1) feisty; urgency=low diff -r 56b405d5a872 -r 28844d7a5ffb packages/ubuntu-gutsy/jython-webstack/debian/changelog --- a/packages/ubuntu-gutsy/jython-webstack/debian/changelog Sat Mar 21 00:34:24 2009 +0100 +++ b/packages/ubuntu-gutsy/jython-webstack/debian/changelog Tue Jul 07 01:12:55 2009 +0200 @@ -31,8 +31,10 @@ WebStack.Resources.Selectors. * Added a filename attribute to FileContent instances, provided for file upload parameters. + * Made content_type an attribute of Transaction instances, + always indicating the set content type for responses. - -- Paul Boddie Sat, 15 Nov 2008 02:27:03 +0100 + -- Paul Boddie Tue, 07 Jul 2009 01:11:58 +0200 webstack (1.2.7-0ubuntu1) feisty; urgency=low diff -r 56b405d5a872 -r 28844d7a5ffb packages/ubuntu-gutsy/python-webstack/debian/changelog --- a/packages/ubuntu-gutsy/python-webstack/debian/changelog Sat Mar 21 00:34:24 2009 +0100 +++ b/packages/ubuntu-gutsy/python-webstack/debian/changelog Tue Jul 07 01:12:55 2009 +0200 @@ -31,8 +31,10 @@ WebStack.Resources.Selectors. * Added a filename attribute to FileContent instances, provided for file upload parameters. + * Made content_type an attribute of Transaction instances, + always indicating the set content type for responses. - -- Paul Boddie Sat, 15 Nov 2008 02:26:43 +0100 + -- Paul Boddie Tue, 07 Jul 2009 01:12:04 +0200 webstack (1.2.7-0ubuntu1) feisty; urgency=low diff -r 56b405d5a872 -r 28844d7a5ffb packages/ubuntu-hoary/python2.4-webstack/debian/changelog --- a/packages/ubuntu-hoary/python2.4-webstack/debian/changelog Sat Mar 21 00:34:24 2009 +0100 +++ b/packages/ubuntu-hoary/python2.4-webstack/debian/changelog Tue Jul 07 01:12:55 2009 +0200 @@ -31,8 +31,10 @@ WebStack.Resources.Selectors. * Added a filename attribute to FileContent instances, provided for file upload parameters. + * Made content_type an attribute of Transaction instances, + always indicating the set content type for responses. - -- Paul Boddie Sat, 15 Nov 2008 02:24:13 +0100 + -- Paul Boddie Tue, 07 Jul 2009 01:12:19 +0200 webstack (1.2.7-0ubuntu1) hoary; urgency=low