always set location on PATCH

don't redirect
This commit is contained in:
MinRK 2013-10-08 14:41:06 -07:00
parent ac5434efba
commit 6c88abe1d6

View File

@ -91,10 +91,8 @@ class NotebookHandler(IPythonHandler):
if model is None:
raise web.HTTPError(400, u'JSON body missing')
model = nbm.update_notebook_model(model, name, path)
if model[u'name'] != name or model[u'path'] != path:
self.set_status(301)
location = self.notebook_location(model[u'name'], model[u'path'])
self.set_header(u'Location', location)
location = self.notebook_location(model[u'name'], model[u'path'])
self.set_header(u'Location', location)
self.set_header(u'Last-Modified', model[u'last_modified'])
self.finish(json.dumps(model, default=date_default))