You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by GitBox <gi...@apache.org> on 2021/06/01 13:48:30 UTC

[GitHub] [trafficserver] shinrich commented on pull request #7885: Close connection after every bad request for HTTP/1.1

shinrich commented on pull request #7885:
URL: https://github.com/apache/trafficserver/pull/7885#issuecomment-852139571


   Here is the case I am testing there.  Thought I had added autests, but I must not have git-added them.
   
   ```
   [shinrich@atslab02 ~]$ nc -C 127.0.0.1 8080
   GET /x HTTP/1.1
   host: localhost
   aa: stuff       
   
   HTTP/1.1 404 Not Found on Accelerator
   Date: Tue, 01 Jun 2021 13:42:02 GMT
   Connection: keep-alive
   Server: ATS/10.0.0
   Cache-Control: no-store
   Content-Type: text/html
   Content-Language: en
   Content-Length: 297
   
   <HTML>
   <HEAD>
   <TITLE>Not Found on Accelerator</TITLE>
   </HEAD>
   
   <BODY BGCOLOR="white" FGCOLOR="black">
   <H1>Not Found on Accelerator</H1>
   <HR>
   
   <FONT FACE="Helvetica,Arial"><B>
   Description: Your request on the specified host was not found.
   Check the location and try again.
   </B></FONT>
   <HR>
   </BODY>
   GET /x HTTP/1.1
   host : bob
   HTTP/1.1 400 Invalid HTTP Request
   Date: Tue, 01 Jun 2021 13:42:22 GMT
   Connection: close
   Server: ATS/10.0.0
   Cache-Control: no-store
   Content-Type: text/html
   Content-Language: en
   Content-Length: 219
   
   <HTML>
   <HEAD>
   <TITLE>Bad Request</TITLE>
   </HEAD>
   
   <BODY BGCOLOR="white" FGCOLOR="black">
   <H1>Bad Request</H1>
   <HR>
   
   <FONT FACE="Helvetica,Arial"><B>
   Description: Could not process this request.
   </B></FONT>
   <HR>
   </BODY>
   
   GET /x HTTP/1.1
   Ncat: Broken pipe.
   ```
   
   Looking at the tcpdump, we see that ATS sent a FIN which nc didn't respond too.  After sending the second get request, ATS sends the RESET.
   
   I tried putting a ^V in a header name, but couldn't get a failure.  Based on your output, the Connection: close is not being added, so there must be another path that the Bad Request takes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org