mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 11:37:35 +00:00
Remove path escaping from LaunchBrowser (#584)
This is so you can have `?query=args`.
This commit is contained in:
parent
d213a48190
commit
33b5b5b312
2 changed files with 4 additions and 3 deletions
|
@ -672,7 +672,9 @@ FUNCTIONS
|
|||
|
||||
LaunchBrowser([path:str])
|
||||
Launches web browser on local machine with URL to this redbean
|
||||
server. This function may be called from your /.init.lua.
|
||||
server. It is the responsibility of the caller to escape the path
|
||||
with EscapePath if needed, as it's not escaped automatically.
|
||||
This function may be called from /.init.lua.
|
||||
|
||||
CategorizeIp(ip:uint32) → str
|
||||
Returns a string describing an IP address. This is currently Class
|
||||
|
|
|
@ -2767,8 +2767,7 @@ static void LaunchBrowser(const char *path) {
|
|||
if (*path != '/') path = gc(xasprintf("/%s", path));
|
||||
if ((prog = commandv(GetSystemUrlLauncherCommand(), gc(malloc(PATH_MAX)),
|
||||
PATH_MAX))) {
|
||||
u = gc(xasprintf("http://%s:%d%s", inet_ntoa(addr), port,
|
||||
gc(EscapePath(path, -1, 0))));
|
||||
u = gc(xasprintf("http://%s:%d%s", inet_ntoa(addr), port, path));
|
||||
DEBUGF("(srvr) opening browser with command %`'s %s", prog, u);
|
||||
ignore.sa_flags = 0;
|
||||
ignore.sa_handler = SIG_IGN;
|
||||
|
|
Loading…
Reference in a new issue