~jaypipes/glance/bug759018

« back to all changes in this revision

Viewing changes to glance/server.py

  • Committer: Tarmac
  • Author(s): jaypipes at gmail
  • Date: 2011-03-23 16:39:11 UTC
  • mfrom: (90.2.9 bug736295)
  • Revision ID: tarmac-20110323163911-jag7sppwd4obup3b
Adds robust functional testing to Glance.

Show diffs side-by-side

added added

removed removed

Lines of Context:
163
163
                yield chunk
164
164
 
165
165
        res = Response(app_iter=image_iterator(),
166
 
                       content_type="text/plain")
 
166
                       content_type="application/octet-stream")
 
167
        # Using app_iter blanks content-length, so we set it here...
 
168
        res.headers.add('Content-Length', image['size'])
167
169
        utils.inject_image_meta_into_headers(res, image)
168
170
        return req.get_response(res)
169
171