From 49c82bcd65c39ae8f3a28c8d9cabdf8d3ccae848 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Tue, 11 Sep 2012 12:59:45 -0500 Subject: [PATCH] allow removal of headers with response.headers[key]=None --- VERSION | 2 +- gluon/http.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 8a099e85..5a418e63 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.0.8 (2012-09-11 12:53:40) stable +Version 2.0.8 (2012-09-11 12:59:42) stable diff --git a/gluon/http.py b/gluon/http.py index 05330a22..9cae6ac7 100644 --- a/gluon/http.py +++ b/gluon/http.py @@ -103,7 +103,7 @@ class HTTP(BaseException): for k, v in headers.iteritems(): if isinstance(v, list): rheaders += [(k, str(item)) for item in v] - else: + elif not v is None: rheaders.append((k, str(v))) responder(status, rheaders) if env.get('request_method','')=='HEAD':