www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20886] New: std.process.browse does not work with URLs 256

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 puremagic.com
          Reporter: zorael 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.
--
May 30