www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9054] New: std.net.curl byLineAsync and byChunkAsync broken.


           Summary: std.net.curl byLineAsync and byChunkAsync broken.
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: david eagen.com

--- Comment #0 from David Eagen <david eagen.com> 2012-11-21 19:50:53 PST ---
Created an attachment (id=1163)
Results from running on 32-bit Ubuntu 12.10 and 64-bit Ubuntu 12.04. 

The byLineAsync and byChunkAsync functions do not work on Linux (both x86 and
x86_64) using DMD 2.0.60. The non-async versions work fine. 

import std.stdio, std.net.curl;
void main() {
  string url = "http://www.dlang.org";

  auto chunkRange = byChunk(url, 10); 
  writeln("byChunk: ", chunkRange.front);

  auto asyncChunkRange = byChunkAsync(url, 10);
  writeln("byChunkAsync: ", asyncChunkRange.front);

On x86 the async call throws an exception:

std.net.curl.CurlException std/net/curl.d(3348): An unknown option was passed
 to libcurl on handle 8B25400

On x86_64 the async call throws that exception and an OwnerTerminated

Logs for both are attached. To get around the problem with link ordering and
curl on linux both were compiled with "dmd chunktest.d -L-lphobos2 -L-lcurl".

Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Nov 21 2012