curl-users
Re: Storing the URL in extended attributes of the downloaded file
Date: Mon, 18 Oct 2010 09:29:27 +0200 (CEST)
On Mon, 18 Oct 2010, Stefan Tomanek wrote:
> I created a small patch that adds a new CLI switch --xattr-url to the curl
> command; when activated, curl adds an extended attribue to the downloaded
> file, preserving the URL for future reference. That makes it easy to track
> down the origin of a once downloaded file.
>
> The patch is available at my github profile:
> http://github.com/wertarbyte/curl/tree/xattrurl
Thanks! A couple of questions and nits about it:
o it can't assume that xattr functionality and header file is present, it
needs to check for them in the configure script
o the code should be done as "config->xattr_url = toggle;" so that it
automatically supports --no-xattr-url as well
o The error output should be done with warnf() and not straight fprintf to
allow users to silence it (it requires the prototype to be modified)
o I never use extended attributes myself. Is 'user.curl.origin' something
everyone is likely to be happy with or should we allow it to be changable?
o It would be great with an addition to the man page explaining this
option
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-users FAQ: http://curl.haxx.se/docs/faq.html Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2010-10-18