mirror of
https://github.com/MercuryWorkshop/adrift.git
synced 2025-05-13 14:20:01 -04:00
fix error while constructing responses
"Response with null body status cannot have body"
This commit is contained in:
parent
d449ed2e42
commit
52a55f616b
2 changed files with 15 additions and 11 deletions
|
@ -43,12 +43,9 @@ export class Connection {
|
|||
let requestType = view.getUint8(cursor) as S2CRequestType;
|
||||
cursor += 1;
|
||||
|
||||
console.log(requestID, requestType);
|
||||
|
||||
const msgText = () => new TextDecoder().decode(data.slice(cursor));
|
||||
const msgJSON = () => JSON.parse(msgText());
|
||||
|
||||
console.log({ requestType });
|
||||
switch (requestType) {
|
||||
case S2CRequestTypes.HTTPResponseStart:
|
||||
const payload = msgJSON();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue