diff --git a/examples/js/index.js b/examples/js/index.js index bb4fc09..442ec19 100644 --- a/examples/js/index.js +++ b/examples/js/index.js @@ -8,8 +8,11 @@ function respond(res, status) { view.setUint32(4, res.length, true); var bytes = new Uint8Array(buffer); + print(res) - print(bytes) + for (let i = 0; i < bytes.length; i++) { + putstr(String.fromCharCode(bytes[i])) + } } console.log("user log here") diff --git a/internal/actrs/runtime.go b/internal/actrs/runtime.go index cbaa545..b4d3c0b 100644 --- a/internal/actrs/runtime.go +++ b/internal/actrs/runtime.go @@ -81,7 +81,7 @@ func (r *Runtime) Receive(c *actor.Context) { func (r *Runtime) initialize(msg *proto.HTTPRequest) error { r.deploymentID = uuid.MustParse(msg.DeploymentID) - // TODO: this could be coming from a Redis cache instead of Postres. + // TODO: this could be coming from a Redis cache instead of Postgres. // Maybe only the blob. Not sure... deploy, err := r.store.GetDeployment(r.deploymentID) if err != nil { diff --git a/internal/shared/shared.go b/internal/shared/shared.go index ae2eb8e..362ccb3 100644 --- a/internal/shared/shared.go +++ b/internal/shared/shared.go @@ -30,6 +30,7 @@ func ParseStdout(stdout io.Reader) (logs []byte, resp []byte, status int, err er magicStart := outLen - magicLen status = int(binary.LittleEndian.Uint32(stdoutb[magicStart : magicStart+4])) respLen := binary.LittleEndian.Uint32(stdoutb[magicStart+4:]) + fmt.Println(status) if int(respLen) > outLen-magicLen { err = fmt.Errorf("response length exceeds available data") return