title: Tomcat 9: header line does not conform to RFC 7230
body: <p>I have an app that was working on Tomcat 8.5.38.
  Now I decided upgrade to Tomcat 9.0.27 and there appears problem with GET request and <a href="https://www.rfc-editor.org/rfc/rfc7230" rel="nofollow noreferrer">RFC 7230, <em>Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing</em></a>.</p>
  <p>The request:</p>
  <pre><code>/api/vehicle/power_off?vehicleId=1428714&amp;dtStart=2019-10-21 08:00:00&amp;dtEnd=2019-10-21 08:30:00
  </code></pre>
  <p>It was working perfectly from both browser (any - IE, Opera, Chrome, FF) and another client (1C ERP system).</p>
  <p>After version upgrade from browser it still works perfectly but from 1C don't. Tomcat shows error:</p>
  <pre><code>28-Oct-2019 17:29:26.201 INFO [http-nio-8080-exec-3] org.apache.coyote.http11.Http11Processor.service Error parsing HTTP request header
   Note: further occurrences of HTTP request parsing errors will be logged at DEBUG level.
      java.lang.IllegalArgumentException: The HTTP header line [get /api/vehicle/power_off?deviceId=1428714&amp;dtStart=2019-10-21%2008:00:00&amp;dtEnd=2019-10-21%2008:30:00 HTTP/1.1: ] does not conform to RFC 7230 and has been ignored.
          at org.apache.coyote.http11.Http11InputBuffer.skipLine(Http11InputBuffer.java:962)
          at org.apache.coyote.http11.Http11InputBuffer.parseHeader(Http11InputBuffer.java:825)
          at org.apache.coyote.http11.Http11InputBuffer.parseHeaders(Http11InputBuffer.java:564)
          at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:309)
          at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
          at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:860)
          at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1587)
          at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
          at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
          at java.lang.Thread.run(Thread.java:748)
  </code></pre>
  <p>The same error is on my dev machine (MacOS + Tomcat 9.0.24) and production server (Ubuntu 16.04 + Tomcat 9.0.27).</p>
  <p>The reason is in colon in datetime parameters. When I remove colons from query string (leave just &quot;2019-10-21 080000&quot;) the request works as expected (with error &quot;datetime cannot be parsed...&quot;). Also when I manually change colons to &quot;%3A&quot; the request works and returns normal result.</p>
  <p>Then I add relaxedQueryChars parameter to Tomcat Connector with colon (though colon is allowed symbol):</p>
  <pre><code>relaxedQueryChars=':[]|{}^&amp;#x5c;&amp;#x60;&amp;quot;&amp;lt;&amp;gt;'
  </code></pre>
  <p>and it still fails.</p>
  <p>What's the difference between 8 and 9 Tomcat versions that my request works in 8 but in 9 do not?
  Is there anything I can do in Tomcat to make this request works? Changing requests on client sides is very hard task...</p>