Mercurial > hg > orthanc
diff Plugins/Engine/OrthancPlugins.cpp @ 1137:d9c27f9f1a51
OrthancPluginSetHttpHeader
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 09 Sep 2014 17:33:46 +0200 |
parents | 208dc67b9bab |
children | 0479d02c6778 |
line wrap: on
line diff
--- a/Plugins/Engine/OrthancPlugins.cpp Tue Sep 09 16:47:04 2014 +0200 +++ b/Plugins/Engine/OrthancPlugins.cpp Tue Sep 09 17:33:46 2014 +0200 @@ -406,11 +406,21 @@ void OrthancPlugins::SetCookie(const void* parameters) { - const _OrthancPluginSetCookie& p = - *reinterpret_cast<const _OrthancPluginSetCookie*>(parameters); + const _OrthancPluginSetHttpHeader& p = + *reinterpret_cast<const _OrthancPluginSetHttpHeader*>(parameters); HttpOutput* translatedOutput = reinterpret_cast<HttpOutput*>(p.output); - translatedOutput->SetCookie(p.cookie, p.value); + translatedOutput->SetCookie(p.key, p.value); + } + + + void OrthancPlugins::SetHttpHeader(const void* parameters) + { + const _OrthancPluginSetHttpHeader& p = + *reinterpret_cast<const _OrthancPluginSetHttpHeader*>(parameters); + + HttpOutput* translatedOutput = reinterpret_cast<HttpOutput*>(p.output); + translatedOutput->AddHeader(p.key, p.value); } @@ -793,6 +803,10 @@ SetCookie(parameters); return true; + case _OrthancPluginService_SetHttpHeader: + SetHttpHeader(parameters); + return true; + case _OrthancPluginService_LookupPatient: case _OrthancPluginService_LookupStudy: case _OrthancPluginService_LookupStudyWithAccessionNumber: