In this experiment, Tomcat needs to be rewritten so that it can respond to other types of protocols.
In the new protocol, what is the GET request used? The request method is automatically filtered out on the vro. Therefore, you need to use other identifiers to identify the GET request.
Assume that the parameter to be passed in is: username = xiaoxiaff & Password = xiaoxiaff
In http11processer, locate row 816
Inputbuffer. parserequestline ();
This line of code parses the incoming request.
Including:
Get and POST Request Parsing.
Query parsing of GET requests.
URI parsing.
Parsing of protocal protocol types.
Go to this method and jump to internalinputbuffer. java.
If you need to add the GET request parameters, you can start here. Set row 476
Request. querystring (). setbytes (BUF, questionpos + 1, end-questionpos-1 );
You only need to replace Buf with the get parameter we need.
Pass GET requests in Tomcat