Hi Darshit, thanks for this new iteration, some comments:
Darshit Shah <[email protected]> writes: > All the changes have been squashed into one single commit. In case it is > preferred to send them as separate commits, I will do the same. no, no problem, this is the preferred way. It is a single change that can go by itself. > + if (opt.method) > + { > + request_set_header (req, "Content-Type", > + "application/x-www-form-urlencoded", rel_none); > + > + if (opt.body_data || opt.body_file) > + { please indent '{' with two empty spaces. > + if (opt.body_data) > + body_data_size = strlen (opt.body_data); > + else > + { > + body_data_size = file_size (opt.body_file); > + if (body_data_size == -1) > + { > + logprintf (LOG_NOTQUIET, _("BODY data file %s missing: %s\n"), > + quote (opt.body_file), strerror (errno)); > + return FILEBADFILE; > + } > + } > + request_set_header (req, "Content-Length", > + xstrdup (number_to_static_string > (body_data_size)), > + rel_value); > + } > + } > + maybe the previous "if (opt.post_data || opt.post_file_name)" case can be handled here? What will break if we just do: if (opt.post_data || opt.post_file_name) { opt.method = "POST"; opt.body_data = opt.post_data; opt.body_file = opt.post_file; } before you check for if (opt.method)? Do you think we can get ride of the old code to handle POST data? In any case I can't still apply your patch upstream, I am waiting for your copyright assignment papers to be processed (or received). Thanks, Giuseppe
