cURL / Mailing Lists / curl-library / Single Mail

curl-library

making commands removable / replaceable?

From: Armel Asselin <asselin.armel_at_wanadoo.fr>
Date: Mon, 21 Aug 2006 17:15:59 +0200

Hello,

we discussed some days ago about making FTP commands (why not others protocols?) removable (for some of them at least) and replaceable, here is the state of the discussion:
- we'd like to have an option (let's say CURLOPT_COMMANDSCHANGES) which would be an slist of lines like that:
    SIZE: (to remove the command, the \0 should come just after the colon)
    SIZE:SUPERSZ (to replace the SIZE commands with SUPERSZ commands)

Here are some propositions:

- as most 'write' high-level commands are in fact based on printf, the command could be replaced with %s and a first parameter with the command text.
- for commands which cannot yet be disabled, curl_get_command_text(conn, "SIZE") for example. curl_get_command_text would return its parameter if it's not found in the changed commands.
- for commands which can be disabled, a curl_is_command_enabled (conn, command, newtext) could be implemented. By default all commands are enabled (unless specified by some other CURLOPT_ stuff), if enabled the newtext would be set to actual text to send (by default original command text).

any comments?

Armel Asselin
----------------------------------------------------
http://www.elliecomputing.com
ECMerge - comparison and merge tool
Received on 2006-08-21