Re: Problem with cookies
Status: Alpha
Brought to you by:
coroberti
From: web l. a. p. t. t. <cur...@li...> - 2007-07-25 16:32:48
|
Robert, 1) You are welcome, and thank you for creating such a usefull tool. My = full name is Artur Barashev. 2) Did you test your fix? :) It looks that the way you fixed it isn't = correct, you are saving the separator pointer by pointing it to locally allocated string (allocated on the = function stack). If you want your fix to work I suggest you move separators_supported[] string array into global = data space (on top of the file, outside of function). Artur ----- Original Message -----=20 From: web loading and performance testing tool=20 To: cur...@li...=20 Sent: Wednesday, July 25, 2007 3:03 AM Subject: Problem with cookies Arthur, Y are correct. This was broken in 0.32 version. This is a shame on my side to make such a stupid error. My test was not fetching that as well. The matters have been corrected. Thank you. Added you to our THANKS file.=20 If you can provide your surname, it will be added. The patch and commit you can see below. Sincerely, Robert=20 ---------- Forwarded message ---------- From: cor...@us... < = cor...@us...> Date: Jul 25, 2007 12:48 PM Subject: SF.net SVN: curl-loader: [488] trunk/curl-loader To: cur...@li...=20 Revision: 488 = http://curl-loader.svn.sourceforge.net/curl-loader/?rev=3D488&view=3Drev = Author: coroberti=20 Date: 2007-07-25 02:47:58 -0700 (Wed, 25 Jul 2007) Log Message: ----------- Bugfix for loading credentials from file. Modified Paths: -------------- trunk/curl-loader/conf-examples/credentials.cred=20 trunk/curl-loader/conf-examples/post-form-tokens-fr-file.conf trunk/curl-loader/doc/QUICK-START trunk/curl-loader/doc/THANKS trunk/curl-loader/parse_conf.c Modified: trunk/curl-loader/conf-examples/credentials.cred=20 = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/curl-loader/conf-examples/credentials.cred 2007-07-22 = 05:02:20 UTC (rev 487) +++ trunk/curl-loader/conf-examples/credentials.cred 2007-07-25 = 09:47:58 UTC (rev 488)=20 @@ -1,4 +1,3 @@ -# Separator used here is ':' Use %20, when you need a white space -david:meleh -israel:hai -hai:vkayam +# Separator used here is ',' +david,meleh,israel +hai,hai,vkayam=20 Modified: = trunk/curl-loader/conf-examples/post-form-tokens-fr-file.conf = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/curl-loader/conf-examples/post-form-tokens-fr-file.conf = 2007-07-22 05:02:20 UTC (rev 487)=20 +++ trunk/curl-loader/conf-examples/post-form-tokens-fr-file.conf = 2007-07-25 09:47:58 UTC (rev 488) @@ -1,6 +1,6 @@ ########### GENERAL SECTION ################################ BATCH_NAME=3D post-form-tokens-fr-file=20 -CLIENTS_NUM_MAX=3D3 +CLIENTS_NUM_MAX=3D2 INTERFACE=3Deth0 NETMASK=3D24 IP_ADDR_MIN=3D194.90.71.215 Modified: trunk/curl-loader/doc/QUICK-START = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20 --- trunk/curl-loader/doc/QUICK-START 2007-07-22 05:02:20 UTC (rev = 487) +++ trunk/curl-loader/doc/QUICK-START 2007-07-25 09:47:58 UTC (rev = 488) @@ -16,11 +16,10 @@ files (e.g. crypto.h), export environment variable OPENSSLDIR with=20 the value of that directory. For example: $export OPENSSLDIR=3Dthe-full-path-to-the-directory - -Another known issue is libidn.so, which means, that some linux = distributions -do have some libidn.so.11, but not libidn.so. Resolve it by creating = a softlink. -In some cases, you may be required to remove -lidn from the linking = line, -whereas you need to comment a line in Makefile and uncomment another. + +We are building libcurl with --without-libidn option. Users, that = would like=20 +to resolve IDNA domain names with "international" letters can edit = our +Makefile and use instead --with-libidn=3Dfull-path-dir. Run the following commands from your bash linux shell: $tar zxfv curl-loader-<version>.tar.gz=20 Modified: trunk/curl-loader/doc/THANKS = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- trunk/curl-loader/doc/THANKS 2007-07-22 05:02:20 UTC (rev = 487) +++ trunk/curl-loader/doc/THANKS 2007-07-25 09:47:58 UTC (rev = 488)=20 @@ -11,3 +11,4 @@ Aleksandar Lazic <al-...@no...> Jeremy Hicks < je...@no...> John Gatewood Ham < bur...@gm...> +Artur B < ar...@gm...> Modified: trunk/curl-loader/parse_conf.c = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=20 --- trunk/curl-loader/parse_conf.c 2007-07-22 05:02:20 UTC (rev = 487) +++ trunk/curl-loader/parse_conf.c 2007-07-25 09:47:58 UTC (rev = 488) @@ -213,7 +213,7 @@ size_t input_length,=20 form_records_cdata* form_record, size_t record_num, - char* separator); + char** separator);=20 static int add_param_to_batch (char*const input, size_t input_length, @@ -388,17 +388,17 @@ size_t input_len, form_records_cdata* form_record,=20 size_t record_num, - char* separator) + char** separator) { - const char separators_supported [] =3D=20 + const char* separators_supported [] =3D { - ',', - ':', - ';', - ' ', - '@', - '/', - '\0' + ",",=20 + ":", + ";", + " ", + "@", + "/", + 0 }; char* sp =3D NULL; int i; @@ -416,9 +416,9 @@ { for (i =3D 0; separators_supported [i]; i++) { - if ((sp =3D strchr (input, separators_supported [i]))) + if ((sp =3D strchr (input, *separators_supported [i]))) { - *separator =3D *sp; /* Remember the separator */=20 + *separator =3D (char *) separators_supported [i]; /* = Remember the separator */ break; } } @@ -429,9 +429,10 @@ "%s - failed to locate in the first string \"%s\" = \n"=20 "any supported separator.\nThe supported = separators are:\n", __func__, input); + for (i =3D 0; separators_supported [i]; i++) { - fprintf (stderr,"\"%c\"\n", separators_supported [i]);=20 + fprintf (stderr,"\"%s\"\n", separators_supported [i]); } return -1; } @@ -440,9 +441,9 @@ char * token =3D 0, *strtokp =3D 0; size_t token_count =3D 0;=20 - for (token =3D strtok_r (input, separator, &strtokp); + for (token =3D strtok_r (input, *separator, &strtokp); token !=3D 0; - token =3D strtok_r (0, separator, &strtokp)) + token =3D strtok_r (0, *separator, &strtokp))=20 { size_t token_len =3D strlen (token); @@ -2687,7 +2688,7 @@ { char fgets_buff[512]; FILE* fp; - char sep; + char* sep =3D 0; // strtok_r requires a string with '\0' /* Open the file with form records @@ -2737,6 +2738,16 @@ continue; } + if (fgets_buff[string_len - 2] =3D=3D '\r') + { + fgets_buff[string_len - 2] =3D '\0';=20 + } + + if (fgets_buff[string_len -1] =3D=3D '\n') + { + fgets_buff[string_len -1] =3D '\0'; + } + if ((int)url->form_records_num >=3D bctx->client_num_max)=20 { fprintf (stderr, This was sent by the SourceForge.net collaborative development = platform, the world's largest Open Source development site. = -------------------------------------------------------------------------= =20 This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a = browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ curl-loader-tracker mailing list cur...@li...=20 https://lists.sourceforge.net/lists/listinfo/curl-loader-tracker=20 --=20 Sincerely, Robert Iakobashvili,=20 coroberti %x40 gmail %x2e com ........................................................... http://curl-loader.sourceforge.net=20 A web testing and traffic generation tool.=20 -------------------------------------------------------------------------= ----- = -------------------------------------------------------------------------= This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a = browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ -------------------------------------------------------------------------= ----- _______________________________________________ curl-loader-devel mailing list cur...@li... https://lists.sourceforge.net/lists/listinfo/curl-loader-devel |