jl2005 opened a new pull request #1620:
URL: https://github.com/apache/incubator-brpc/pull/1620


   When an incorrect HTTP request is received, the existing code returns an 
`HttpRequest`, which should actually return an `HttpResponse`.
   before fixing:
   ```
   # curl 127.0.0.1:8010/v1/queue/stop\ 1  -v                                   
                   ✔  16:21:13
   *   Trying 127.0.0.1...
   * TCP_NODELAY set
   * Connected to 127.0.0.1 (127.0.0.1) port 8010 (#0)
   > GET /v1/queue/stop 1 HTTP/1.1
   > Host: 127.0.0.1:8010
   > User-Agent: curl/7.64.1
   > Accept: */*
   >
   GET / HTTP/1.1
   Host: 127.0.0.1:58674
   Accept: */*
   User-Agent: brpc/1.0 curl/7.0
   
   * Closing connection 0
   ```
   After modification:
   ```
   # curl 127.0.0.1:8010/v1/queue/stop\ 1  -v                                   
                                ✔  15:43:28
   *   Trying 127.0.0.1...
   * TCP_NODELAY set
   * Connected to 127.0.0.1 (127.0.0.1) port 8010 (#0)
   > GET /v1/queue/stop 1 HTTP/1.1
   > Host: 127.0.0.1:8010
   > User-Agent: curl/7.64.1
   > Accept: */*
   >
   < HTTP/1.1 400 Bad Request
   * no chunk, no close, no size. Assume close to signal end
   <
   * Closing connection 0
   ```
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to