fix response
This commit is contained in:
		@@ -43,6 +43,11 @@ export class HTTPServer {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    for await (const conn of this.server) {
 | 
					    for await (const conn of this.server) {
 | 
				
			||||||
 | 
					      this.handleHttp(conn);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  private async handleHttp(conn: Deno.Conn){
 | 
				
			||||||
    const httpConn = Deno.serveHttp(conn);
 | 
					    const httpConn = Deno.serveHttp(conn);
 | 
				
			||||||
      for await (const requestEvent of httpConn) {
 | 
					      for await (const requestEvent of httpConn) {
 | 
				
			||||||
        const url = new URL(requestEvent.request.url);
 | 
					        const url = new URL(requestEvent.request.url);
 | 
				
			||||||
@@ -112,7 +117,6 @@ export class HTTPServer {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
  get(path: string, handler: RouteHandler) {
 | 
					  get(path: string, handler: RouteHandler) {
 | 
				
			||||||
    this.add("GET", path, handler);
 | 
					    this.add("GET", path, handler);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user