~jaypipes/glance/bug704854

« back to all changes in this revision

Viewing changes to glance/server.py

  • Committer: jaypipes at gmail
  • Date: 2011-02-18 17:39:12 UTC
  • mfrom: (70.3.4 glance)
  • Revision ID: jaypipes@gmail.com-20110218173912-c6535homx96tgklm
Merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
341
341
                location = req.headers['x-image-meta-location']
342
342
                self._activate(req, image_meta, location)
343
343
 
344
 
        return dict(image=image_meta)
 
344
        # APP states we should return a Location: header with the edit
 
345
        # URI of the resource newly-created.
 
346
        res = Response(request=req, body=json.dumps(dict(image=image_meta)),
 
347
                       content_type="text/plain")
 
348
        res.headers.add('Location', "/images/%s" % image_meta['id'])
 
349
 
 
350
        return req.get_response(res)
345
351
 
346
352
    def update(self, req, id):
347
353
        """