title: Strange requests in access logs lead to IllegalArgumentException
body: <p>I am using tomcat8.0.43 as my server.</p>
  
  <p>When reviewing my logs, occasionally I see:</p>
  
  <blockquote>
    <p>[...]INFO[...] org.apache.coyote.http11.AbstractHttp11Processor.process
    Error parsing HTTP request header<br>
    Note: further occurrences of HTTP
    header parsing errors will be logged at DEBUG level. 
    java.lang.IllegalArgumentException: Invalid character found in the
    HTTP protocol</p>
  </blockquote>
  
  <p>Or:</p>
  
  <blockquote>
    <p>java.lang.IllegalArgumentException: Invalid character found in the
    request target. The valid characters are defined in RFC 7230 and RFC
    3986</p>
  </blockquote>
  
  <p>If I look at my access logs, I see that the urls that were requested to yield these exceptions were things like:</p>
  
  <blockquote>
    <p>"GET /scripts/index.php?OPT_Session= null" 400</p>
  </blockquote>
  
  <p>or:</p>
  
  <blockquote>
    <p>"GET null null" 400</p>
  </blockquote>
  
  <p>Was I correct in identifying the requests that caused the exceptions to be thrown? </p>
  
  <p>Is there anything that I can do to stop these exceptions from being thrown or restrict these requests from being made?</p>
  
  <p>A normal browser doesn't even allow a client to enter a url with a space in it. It appears these requests do have spaces in them though.</p>
  
  <p>Thanks.</p>