Open nerkn opened 2 years ago
This is not enough info to reproduce the problem. Please do post a minimal, but complete source code, so that it can be reproduced.
reVerseProxyV here it is ready, I compiled and run it, then entered localhost:8080 to chrome url bar,
signal 11: segmentation fault
/tmp/v_1000/ReverseProxy.8681672687841676730.tmp.c:11938: at print_backtrace: Backtrace
/tmp/v_1000/ReverseProxy.8681672687841676730.tmp.c:12009: by v_segmentation_fault_handler
7f9b43959090 : by ???
/tmp/v_1000/ReverseProxy.8681672687841676730.tmp.c:32008: by main__ExampleHandler_handle
/tmp/v_1000/ReverseProxy.8681672687841676730.tmp.c:5839: by main__ExampleHandler_handle_Interface_net__http__Handler_method_wrapper
/tmp/v_1000/ReverseProxy.8681672687841676730.tmp.c:31037: by net__http__Server_parse_and_respond
/tmp/v_1000/ReverseProxy.8681672687841676730.tmp.c:30970: by net__http__Server_listen_and_serve
/tmp/v_1000/ReverseProxy.8681672687841676730.tmp.c:32049: by main__main
/tmp/v_1000/ReverseProxy.8681672687841676730.tmp.c:32904: by main
OS: linux, Linux Mint 20.3 Processor: 4 cpus, 64bit, little endian, Intel(R) Core(TM) i3-6006U CPU @ 2.00GHz CC version: cc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
getwd: /hidden/vweb vmodules: /hidden/.vmodules vroot: /hidden/v/v vexe: /hidden/v/v/v vexe mtime: 2022-07-21 04:53:19 is vroot writable: true is vmodules writable: true V full version: V 0.3.0 8593408
Git version: git version 2.25.1 Git vroot status: weekly.2022.29-17-g85934081 (24 commit(s) behind V master) .git/config present: true thirdparty/tcc status: thirdparty-linux-amd64 827f745
What did you do?
struct Redirects{ from string to string } site_mappings is a array of Redirects
site := req.header.get(CommonHeader.host)or{ 'error' } found_mappings := h.site_mappings.filter(fn [site](m Redirects) bool{ return m.from == site })
What did you expect to see? array of Redirects
What did you see instead? signal 11: segmentation fault