final UriType uriType = uriInfo.getUriType();
final String location =
(method == ODataHttpMethod.POST && (uriType == UriType.URI1 || uriType == UriType.URI6B)) ? odataResponse
.getIdLiteral() : null;
final HttpStatusCodes s = getStatusCode(odataResponse, method, uriType);
extendedResponse = extendedResponse.idLiteral(location).status(s);
if (!odataResponse.containsHeader(ODataHttpHeaders.DATASERVICEVERSION)) {
extendedResponse = extendedResponse.header(ODataHttpHeaders.DATASERVICEVERSION, serverDataServiceVersion);
}
if (!HttpStatusCodes.NO_CONTENT.equals(s) && !odataResponse.containsHeader(HttpHeaders.CONTENT_TYPE)) {