cURL / Mailing Lists / curl-library / Single Mail


libcurl + https + multi = lost information

From: REISS Pierre <>
Date: Mon, 17 Mar 2008 18:18:11 +0100

Dear libcurl developers,

    I did not find any known bug of this kind in your database.
1 _ OS = Windows XP Version2002 Service Pack 2 (32 bits)
    2 kinds of environment (both fail):
      VC7 without proxy nor userpwd (the provided source code),
      VC8 with proxy and userpwd.
2 _ What is written:
    A first URL is read in easy mode. Protocol is htpps.
    Then 'curl_easy_cleanup' on this CURL*.
    From what is read, 2 other URL names, say URL0 and URL1, are
    extracted, with the same protocol and the same hostname.
    They differ only by "&offset=1" and "&offset=2".
    I want to read URL0 and URL1 in multi mode.
    with different FILE* for URL0 and URL1:
    Temp000 and Temp001 are respectively associated with URL0 and URL1.
    The code is written on the basis of 10-at-a-time.c (see Main.cpp).
3 _ What is expected:
    2 files Temp000 and Temp001 of about 100 Kbytes are created.
    When the program runs properly, one can read somewhere in Temp000:
      "<strong>2</strong> / (an integer)"
    and in Temp001:
      "<strong>3</strong> / (an integer)"
4 _ What happens:
    Surprisingly, with a probability of 50%, I got the SAME information
    in both associated files.
    To be accurate, the common information comes from the LAST

    Wrong.txt is a typical output. (The output line
    "19:47:35 ++++++++++++++++++++++++++++++++++++++++++++++"
    appearing twice, I know quickly that I encountered a bad case...)
5 _ Other informations and files:
    Main.cpp (105 lines) is my invocation to libcurl.
    Wrong.txt is the libcurl verbose output.
    The true URL site has been masked.

    On the other extremity of the pipe, the properties of the URL are:
< HTTP/1.1 200 OK
< Server: Apache/2.0.46 (Red Hat)
< Pragma: no-cache
< Expires: 0
< Set-Cookie: JSESSIONID=XXX!YYY; path=/
< Cache-Control: no-store, no-cache, must-revalidate
< Transfer-Encoding: chunked
< Content-Type: text/html; charset=ISO-8859-1

    I compared such a case with:
    _ 3 URLS, read with the same scheme, but with protocol http
      and the same hostname: it works fine.
    _ my 3 URLs, read in easy mode: it works fine.

    I tried to investigate with the source code. Sorry, I was
    data->set.out are different, conn->connectindex too, conn->sockfd
    Something with the sockets?
6 _ Confidentiality problem:
    I don't know any other https URL without a high confidentiality

    In order to reproduce the described behaviour, I keep some
    files with the real used URL:
    _ NoCurl.cpp (142 lines) extracts information (no invocation to
    _ NoCurl.h
    _ PRLHome.bat is what I used to build libcurl.dll (in ../lib)
      on my home computer (options like in your makefile).
    _ Home.bat is used to build my sample.
    _ The full version of Wrong.txt.

    In the case you agree with this behaviour, and it would be not a
    misunderstanding from my side, and you need the full code, let me
    how to preserve its knowledge from a full public availability.
    And how to restrict that if you think it will be useful...
    (I have myself nothing to hide).

 <<Wrong.txt>> <<Main.cpp>>
    Let me know if I have to change a bit the code.
    But I am a full novice with sockets.

    Thank you for your help,
      Pierre REISS

  • application/octet-stream attachment: Main.cpp
Received on 2008-03-17