curl-library
Bug in curl_escape
Date: Sat, 7 Apr 2001 02:12:26 +0200
Hello,
curl_escape doesn't work when you do:
escapedStr=curl_escape(string,0);
One solution is to do:
char *curl_escape(char *string, int length)
{
int alloc = (length?length:strlen(string))+1;
char *ns = malloc(alloc);
unsigned char in;
int newlen = alloc;
int index=0;
length=alloc-1; <--- ADD THIS LINE
while(length--) {
in = *string;
if(' ' == in)
-------------------------------------
By the way, in the setopt man page the option
before the last one has the wrong name, I think
it should be CURLOPT_EGDSOCKET not
CURLOPT_FORBID_REUSE
Andres
_______________________________________________
Curl-library mailing list
Curl-library_at_lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/curl-library
Received on 2001-04-07