Add redbean -I flag for launching browser

It's now possible with any redbean (including redbean-original) to
launch the system web browser without having to use the Lua API. For
example, you can create an args file:

    echo -I/ >.args
    zip redbean-original.com .args

That will white-label redbean so it launches a specific page when you
double-click on the executable.

See https://github.com/jart/cosmopolitan/discussions/472
This commit is contained in:
Justine Tunney 2022-07-17 06:11:13 -07:00
parent 4d25f8c3c9
commit 5b11033d4d
3 changed files with 7 additions and 4 deletions

View file

@ -1363,7 +1363,7 @@ static int ssl_parse_client_hello_v2( mbedtls_ssl_context *ssl )
/* [jart] grab some client ciphers for error messages */
bzero(ssl->client_ciphers, sizeof(ssl->client_ciphers));
for( i = j = 0, p = buf + 6; j < ciph_len; j += 3, p += 3 )
if( !p[0] && i < ARRAYLEN( ssl->client_ciphers ) )
if( !p[0] && i+1 < ARRAYLEN( ssl->client_ciphers ) )
ssl->client_ciphers[i++] = p[1] << 8 | p[2];
#if defined(MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE)
@ -2208,7 +2208,7 @@ read_record_header:
/* [jart] grab some client ciphers for error messages */
bzero(ssl->client_ciphers, sizeof(ssl->client_ciphers));
for( i = j = 0, p = buf + ciph_offset + 2; j < ciph_len; j += 2, p += 2 )
if( i < ARRAYLEN( ssl->client_ciphers ) )
if( i+1 < ARRAYLEN( ssl->client_ciphers ) )
ssl->client_ciphers[i++] = p[0] << 8 | p[1];
/*