Re: [PATCH] http-push: refactor request url creation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 26 Jan 2009, Ray Chuan wrote:

-     curl_easy_setopt(slot->curl, CURLOPT_URL, url);
+     curl_easy_setopt(slot->curl, CURLOPT_URL, request->url);

The original code gave a separate "url" to setop() but this gives the same
string.  Does curl_easy_setop() copies the given string away?  IOW is this
change safe?

curl strdup's it, so this is safe.

I'm not sure what the oldest possibly libcurl version git can deal with, but here's a related quote from the curl_easy_setopt man page:

       NOTE: before 7.17.0 strings were  not  copied.  Instead  the  user  was
       forced keep them available until libcurl no longer needed them.

--

 / daniel.haxx.se
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux