<commit_before>package controllers.organization

import play.api.mvc._
import controllers.OrganizationController
import eu.delving.LaunchFile
import java.util.Date
import java.text.SimpleDateFormat

/**
 *
 * @author <NAME> <<EMAIL>>
 */

object SipCreator extends OrganizationController {

  private val format = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz")

  def index(orgId: String) = OrganizationMember {
    Action {
      implicit request => Ok(Template('orgId -> orgId))
    }
  }

  def jnlp(user: String) = Root {

    Action {
      implicit request =>

        val host = request.domain
        val home = "http://" + host + "/" + user
        val codebase = "http://" + host + "/assets/sip-creator/"

        val jnlp = LaunchFile.createJNLP(home, codebase, user)

        val lastModified = {
          val url = SipCreator.getClass.getResource("/eu/delving/LaunchFile.class")
          new Date(url.openConnection().getLastModified)
        }

        Ok(jnlp).
          as("application/x-java-jnlp-file").
          withHeaders(
            (CACHE_CONTROL, "no-cache"),
            (LAST_MODIFIED, format.format(lastModified))
          )
    }
  }

}
<commit_msg>Hotfix JNLP<commit_after>package controllers.organization

import play.api.mvc._
import controllers.OrganizationController
import eu.delving.LaunchFile
import java.util.Date
import java.text.SimpleDateFormat

/**
 *
 * @author <NAME> <<EMAIL>>
 */

object SipCreator extends OrganizationController {

  private val format = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss zzz")

  def index(orgId: String) = OrganizationMember {
    Action {
      implicit request => Ok(Template('orgId -> orgId))
    }
  }

  def jnlp(user: String) = Root {

    Action {
      implicit request =>

        val host = request.domain + ":80" // we need the port for the sip-creator
        val home = "http://" + host + "/" + user
        val codebase = "http://" + host + "/assets/sip-creator/"

        val jnlp = LaunchFile.createJNLP(home, codebase, user)

        val lastModified = {
          val url = SipCreator.getClass.getResource("/eu/delving/LaunchFile.class")
          new Date(url.openConnection().getLastModified)
        }

        Ok(jnlp).
          as("application/x-java-jnlp-file").
          withHeaders(
            (CACHE_CONTROL, "no-cache"),
            (LAST_MODIFIED, format.format(lastModified))
          )
    }
  }

}

{'fraction_non_alphanumeric': 0.12324814509480626, 'fraction_numerical': 0.0008244023083264633, 'mean_word_length': 2.532751091703057, 'pattern_counts': {'":': 1, '<': 9, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2402621', 'n_tokens_mistral': 767, 'n_tokens_neox': 743, 'n_words': 163}