code: public void eol() throws ProtocolException {
          char next = nextChar();
  
          // Ignore trailing spaces.
          while (next == ' ') {
              consume();
              next = nextChar();
          }
  
          // handle DOS and unix end-of-lines
          if (next == '\r') {
              consume();
              next = nextChar();
          }
  
          // Check if we found extra characters.
          if (next != '\n') {
              throw new ProtocolException("Expected end-of-line, found more character(s): "+next);
          }
          dumpLine();
      }
docs: Moves the request line reader to end of the line, checking that no non-space
  character are found.
  
  @throws ProtocolException If more non-space tokens are found in this line,
  or the end-of-file is reached.