<commit_before>package com.oembedler.moon.graphiql.boot;

import org.springframework.core.io.ClassPathResource;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.util.StreamUtils;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author <NAME>
 */
@Controller
public class GraphiQLController {
    @RequestMapping(value = "${graphiql.mapping:/graphiql}", produces = MediaType.TEXT_HTML_VALUE)
    public void graphiql(HttpServletResponse response) throws IOException {
        StreamUtils.copy(new ClassPathResource("graphiql.html").getInputStream(), response.getOutputStream());
    }
}<commit_msg>Fix graphiql page rendering as text (#27)<commit_after>package com.oembedler.moon.graphiql.boot;

import org.springframework.core.io.ClassPathResource;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.util.StreamUtils;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author <NAME>
 */
@Controller
public class GraphiQLController {
    @RequestMapping(value = "${graphiql.mapping:/graphiql}", produces = MediaType.TEXT_HTML_VALUE)
    public void graphiql(HttpServletResponse response) throws IOException {
        response.setContentType("text/html");
        StreamUtils.copy(new ClassPathResource("graphiql.html").getInputStream(), response.getOutputStream());
    }
}
{'fraction_non_alphanumeric': 0.11194029850746269, 'fraction_numerical': 0.0012437810945273632, 'mean_word_length': 6.119469026548672, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '1896846', 'n_tokens_mistral': 441, 'n_tokens_neox': 438, 'n_words': 77}