fix response
This commit is contained in:
parent
11e7ff63f8
commit
5da902fb3b
@ -43,7 +43,12 @@ export class HTTPServer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for await (const conn of this.server) {
|
for await (const conn of this.server) {
|
||||||
const httpConn = Deno.serveHttp(conn);
|
this.handleHttp(conn);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private async handleHttp(conn: Deno.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);
|
||||||
const filepath = decodeURIComponent(url.pathname);
|
const filepath = decodeURIComponent(url.pathname);
|
||||||
@ -111,7 +116,6 @@ export class HTTPServer {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get(path: string, handler: RouteHandler) {
|
get(path: string, handler: RouteHandler) {
|
||||||
|
Reference in New Issue
Block a user