code: public static MediaType getResponseType(ContainerRequest request, Integer status) {
          if (status != null && status == 406) {
              return MediaType.TEXT_HTML_TYPE;
          }
          List<MediaType> accepts = request.getAcceptableMediaTypes();
          MediaType m;
          if (accepts != null && accepts.size() > 0) {
              m = accepts.get(0);
          } else {
              m = Requests.getMediaType();
          }
          if (m.isWildcardType() || m.equals(LOW_IE_DEFAULT_REQ_TYPE)) {
              m = MediaType.TEXT_HTML_TYPE;
          }
          return m;
      }
docs: <p>getResponseType.</p>
  
  @param request a {@link org.glassfish.jersey.server.ContainerRequest} object.
  @param status  a {@link java.lang.Integer} object.
  @return a {@link javax.ws.rs.core.MediaType} object.