[Issue 20886] New: std.process.browse does not work with URLs 256 characters or longer

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat May 30 21:32:40 UTC 2020


https://issues.dlang.org/show_bug.cgi?id=20886

          Issue ID: 20886
           Summary: std.process.browse does not work with URLs 256
                    characters or longer
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody at puremagic.com
          Reporter: zorael at gmail.com

Manjaro/Arch x86_64, dmd 2.092.0.

Supplying a long URL to std.process.browse seems to just make it execute
xdg-open without passing the URL as an argument. (The URL I want to open is 397
characters.)

import std;

void main()
{
    immutable url = "http://" ~ 'x'.repeat(249).array.idup;
    assert(url.length == 256);
    browse(url);
}

No browser window is opened, instead it outputs:

>    xdg-open -- opens a file or URL in the user's preferred
>    application
> 
> Synopsis
> 
>    xdg-open { file | URL }
> 
>    xdg-open { --help | --manual | --version }
> 
> Use 'man xdg-open' or 'xdg-open --manual' for additional info.

--


More information about the Digitalmars-d-bugs mailing list