I satisfied both of us, playing a little with the order of the lines:

      if (ciP->outFormat == NOFORMAT)
      {
        /* This is actually an error in the HTTP layer (not exclusively NGSI) so we don't want to use 200 */
        ciP->httpStatusCode = SccNotAcceptable;
        ciP->answer         = restErrorReplyGet(ciP, XML, "", "OrionError", SccNotAcceptable,
                                            std::string("acceptable types: 'application/xml' but Accept header in request was: '") + ciP->httpHeaders.accept + "'");
        ciP->outFormat      = XML; // We use XML as default format