~ubuntu-branches/ubuntu/trusty/mapnik/trusty

« back to all changes in this revision

Viewing changes to bindings/python/mapnik/ogcserver/cgiserver.py

  • Committer: Bazaar Package Importer
  • Author(s): Andres Rodriguez
  • Date: 2009-05-20 15:39:58 UTC
  • mfrom: (3.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090520153958-cf6z1ql9zva4y4dq
Tags: 0.6.0-1ubuntu1
* Merge from debian unstable (LP: #378819), remaining changes:
  - debian/control:
    + Change bdeps from python2.5-dev to python-all-dev (>= 2.5)
    + Change XS-Python-Version from 2.5 to >= 2.5
  - debian/rules:
    + Various changes to enable python2.5 and python2.6 builds
* debian/patches/libtool2_2.diff Dropped. Included upsteam.
* Removed quilt support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
# License along with this library; if not, write to the Free Software
18
18
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
19
#
20
 
# $Id: cgiserver.py 283 2006-07-22 18:54:53Z jdoyon $
 
20
# $Id: cgiserver.py 1033 2009-03-30 04:25:01Z dane $
 
21
 
 
22
"""CGI/FastCGI handler for Mapnik OGC WMS Server.
 
23
 
 
24
Requires 'jon' module.
 
25
 
 
26
"""
21
27
 
22
28
from os import environ
23
29
from tempfile import gettempdir
84
90
            raise OGCException('Operation "%s" not supported.' % request, 'OperationNotSupported')
85
91
        response = requesthandler(ogcparams)
86
92
        req.set_header('Content-Type', response.content_type)
 
93
        req.set_header('Content-Length', str(len(response.content)))
87
94
        req.write(response.content)
88
95
 
89
96
    def traceback(self, req):
99
106
            eh = ExceptionHandler111(self.debug)
100
107
        response = eh.getresponse(reqparams)
101
108
        req.set_header('Content-Type', response.content_type)
 
109
        req.set_header('Content-Length', str(len(response.content)))
102
110
        req.write(response.content)
103
111
 
104
112
def lowerparams(params):