From 226d5d8247018948bc81c5d87e4a66f34555bce6 Mon Sep 17 00:00:00 2001 From: zmagod Date: Mon, 9 Jan 2017 11:51:18 +0100 Subject: [PATCH] added blank string to wopi-lock header param --- app/controllers/wopi_controller.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/wopi_controller.rb b/app/controllers/wopi_controller.rb index e61ccbadb..2f61f1aa8 100644 --- a/app/controllers/wopi_controller.rb +++ b/app/controllers/wopi_controller.rb @@ -128,7 +128,7 @@ class WopiController < ActionController::Base render nothing: :true, status: 409 and return end else - response.headers['X-WOPI-Lock'] = '' + response.headers['X-WOPI-Lock'] = ' ' render nothing: :true, status: 409 and return end end @@ -175,7 +175,7 @@ class WopiController < ActionController::Base render nothing: :true, status: 409 and return end else - response.headers['X-WOPI-Lock'] = '' + response.headers['X-WOPI-Lock'] = ' ' render nothing: :true, status: 409 and return end end @@ -186,7 +186,7 @@ class WopiController < ActionController::Base if @asset.locked? response.headers['X-WOPI-Lock'] = @asset.lock else - response.headers['X-WOPI-Lock'] = '' + response.headers['X-WOPI-Lock'] = ' ' end render nothing: :true, status: 200 and return end @@ -229,7 +229,7 @@ class WopiController < ActionController::Base render nothing: :true, status: 200 and return else logger.warn 'WOPI: trying to modify unlocked file' - response.headers['X-WOPI-Lock'] = '' + response.headers['X-WOPI-Lock'] = ' ' render nothing: :true, status: 409 and return end end