diff options
author | Heiko Bernloehr <Heiko.Bernloehr@FreeIT.de> | 2016-01-11 14:09:18 +0100 |
---|---|---|
committer | Heiko Bernloehr <Heiko.Bernloehr@FreeIT.de> | 2016-01-27 01:50:46 +0100 |
commit | 5b039b7abb43a90d3615137f570900bfeb487527 (patch) | |
tree | ea0761bf088f0f86ed8fab819bd0739424dec211 | |
parent | 772b394e44c095b8f1c426c418de6a505cc11f1c (diff) | |
download | ecs2-5b039b7abb43a90d3615137f570900bfeb487527.tar.gz ecs2-5b039b7abb43a90d3615137f570900bfeb487527.zip |
Add server port to location header.
When creating a resource ECS returns a location header in its http
response. If the server port differs from 80 or 443 the server port will
be included in the location header, e.g.:
Location: http://localhost:8080/numlab/evaluations/1044199
-rw-r--r-- | app/controllers/messages_controller.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb index d43d0ec..deb01a6 100644 --- a/app/controllers/messages_controller.rb +++ b/app/controllers/messages_controller.rb @@ -246,6 +246,7 @@ protected def create_render location = request.protocol + request.host + location += ":" + request.headers["SERVER_PORT"] unless [80,443].include? request.headers["SERVER_PORT"] location += request.headers["SCRIPT_NAME"] if request.headers.has_key?("SCRIPT_NAME") location += request.path.gsub(/\/*$/,'') + "/" + @record.id.to_s if @app_namespace == 'sys' and @ressource_name == 'auths' |