www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14712] New: GIT HEAD : std.net.curl regressions

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

          Issue ID: 14712
           Summary: GIT HEAD : std.net.curl regressions
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: regression
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: temtaime gmail.com

download() no longer works: it seems that it saves ubyte[].to!string now
because i see [ 123, 44, 32, ... ] in downloaded file.
I've looked in the source and i don't know why now curl uses File.write and
opens a file in a binary mode.
It should opens the file in wb mode and use rawWrite function instead.

Also simple example:

import std.net.curl;

void main() {
download(``, ``);
}

no longer compiles with following error:
src\phobos\std\net\curl.d(292): Error: undefined identifier 'File'
src\phobos\std\net\curl.d(299): Error: template instance
std.net.curl.download!(FTP) error instantiating
main.d(5):        instantiated from here: download!(AutoProtocol)
src\phobos\std\net\curl.d(299): Error: cannot return non-void from void
function

Seems that one forgot import std.stdio;

--
Jun 19 2015