aboutsummaryrefslogtreecommitdiff
path: root/http_server.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2023-11-20 02:04:00 +0700
committerShulhan <ms@kilabit.info>2023-11-20 02:04:00 +0700
commit45af2385eb98994e91792e77e6912b1b74ebb677 (patch)
treeadcea778840969a5b008e7b2e3caa323388abb45 /http_server.go
parent24cb59b547cbbb0a36b0aa54ad5ec13b6c095a8d (diff)
downloadawwan-45af2385eb98994e91792e77e6912b1b74ebb677.tar.xz
all: do not changes the Script path in the response of HTTP Execute
Previously, the ExecRequest from HTTP Execute endpoint changes the Script value to the absolute script path in the system. This changes fix this issue to minimize inconsistency between request and response.
Diffstat (limited to 'http_server.go')
-rw-r--r--http_server.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/http_server.go b/http_server.go
index 96b73dc..009b821 100644
--- a/http_server.go
+++ b/http_server.go
@@ -622,10 +622,7 @@ func (httpd *httpServer) awwanApiExecute(epr *libhttp.EndpointRequest) (resb []b
return nil, res
}
- req.Script = filepath.Join(httpd.memfsBase.Opts.Root, req.Script)
- req.lineRange = parseLineRange(req.LineRange)
-
- err = req.init()
+ err = req.init(httpd.memfsBase.Opts.Root)
if err != nil {
res.Message = fmt.Sprintf(`%s: %s`, logp, err)
return nil, res