[X] Check for Exec path outside of root in Transformer
[X] Fix error checking in DynamicRenderingTransformer
Closes#37
Co-authored-by: Nicolas Herry <beastieboy@beastieboy.net>
Reviewed-on: #38
// ExecutableTransformer is a ResponseTransformerFunc that runs the executable found at rq.Fullpath, and crafts a new Request object with the paths set to the filename or the directory name returned by the executable. Parameters are returned unchanged in case of errors. Note that the executable must have the executable bit set in its Unix permission mode for the owner or the group.
rs.ContentText=[]string{fmt.Sprint("Error retrieving the error page for the request. The original error code was ",rs.ErrorCode," for the selector ",rq.Path)}
// DynamicRenderingTransformerFor is a function that returns a function that executes the template found in rq.FullPath, and passes it the DynamicContext instance given in argument. It returns the result of runnig the template as a rs.PlainText response, in the .ContentText field.