Back to LanguageTool Homepage - Privacy - Imprint

sendResponseHeaders: being invoked with a content length for a HEAD request

My logs are filling up with the following output. I am only really sending /check requests from an internal Python API to this endpoint. I guess this might be due to some CORS check? but also not sure if this warning is really valid or can just be ignored (and therefore can be disabled) …?

Dec 29, 2021 1:25:34 PM sun.net.httpserver.ExchangeImpl sendResponseHeaders
WARNING: sendResponseHeaders: being invoked with a content length for a HEAD request
2021-12-29 13:25:34.833 +0000 ERROR org.languagetool.server.LanguageToolHttpHandler An error has occurred: 'Missing arguments for LanguageTool API. Please see https://languagetool.org/http-api/swagger-ui/#/default', sending HTTP code 400. Access from 127.0.0.1, HTTP user agent: Edge Health Probe, User agent param: null, Referrer: null, language: null, h: 2, r: 1717, time: 0m: ALL, l: DEFAULT, Stacktrace follows:org.languagetool.server.BadRequestException: Missing arguments for LanguageTool API. Please see https://languagetool.org/http-api/swagger-ui/#/default
    at org.languagetool.server.LanguageToolHttpHandler.handle(LanguageToolHttpHandler.java:186)
    at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
    at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:83)
    at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:82)
    at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:675)
    at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
    at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:647)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

You should probably turn off HEAD requests on the client. I don’t think LT can answer those requests.