mirror of
https://github.com/ehang-io/nps.git
synced 2025-09-02 11:56:53 +00:00
http connection
This commit is contained in:
@@ -158,10 +158,10 @@ func (s *httpServer) httpHandle(c *conn.Conn, r *http.Request) {
|
||||
defer connClient.Close()
|
||||
defer c.Close()
|
||||
for {
|
||||
r := <-reqCh
|
||||
if resp, err := http.ReadResponse(bufio.NewReader(connClient), r); err != nil {
|
||||
return
|
||||
} else {
|
||||
r := <-reqCh
|
||||
//if the cache is start and the response is in the extension,store the response to the cache list
|
||||
if s.useCache && strings.Contains(r.URL.Path, ".") {
|
||||
b, err := httputil.DumpResponse(resp, true)
|
||||
|
Reference in New Issue
Block a user