comparison OrthancServer/FromDcmtkBridge.cpp @ 1981:4b545a8b1f95

return code in Toolbox::DecodeDataUriScheme
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 22 Apr 2016 09:05:06 +0200
parents 325772dadcd6
children 9b61701c35f2
comparison
equal deleted inserted replaced
1980:ebce5f456b8e 1981:4b545a8b1f95
1262 1262
1263 if (decodeDataUriScheme && 1263 if (decodeDataUriScheme &&
1264 boost::starts_with(utf8Value, "data:application/octet-stream;base64,")) 1264 boost::starts_with(utf8Value, "data:application/octet-stream;base64,"))
1265 { 1265 {
1266 std::string mime; 1266 std::string mime;
1267 Toolbox::DecodeDataUriScheme(mime, binary, utf8Value); 1267 if (!Toolbox::DecodeDataUriScheme(mime, binary, utf8Value))
1268 {
1269 throw OrthancException(ErrorCode_BadFileFormat);
1270 }
1271
1268 decoded = &binary; 1272 decoded = &binary;
1269 } 1273 }
1270 else if (dicomEncoding != Encoding_Utf8) 1274 else if (dicomEncoding != Encoding_Utf8)
1271 { 1275 {
1272 binary = Toolbox::ConvertFromUtf8(utf8Value, dicomEncoding); 1276 binary = Toolbox::ConvertFromUtf8(utf8Value, dicomEncoding);