| |
|
|
|
cURL Mailing List Monthly Index Single Mail
curl-users Mailing List Archives
Re: Patch to use filename from Content-disposition header
From: Björn Stenberg <bjorn_at_haxx.se>
Date: Thu, 31 Dec 2009 21:49:21 +0100
Kamil Dudka wrote:
Well, a "proper" solution won't bring much benefit. Since we don't have any sort of file locking, it doesn't matter if we detect&create the file atomically or not. Even if we do, nothing prevents another application from corrupting the file immediately after we create it.
The purpose of the filename check is just a helper to avoid surprises, such as when the server-provided filename is the same as an unrelated file you already have in the dir. Cross-application file coherence is not curl's job. We don't attempt it anywhere else, so I don't see a reason to do it here.
The cost of adding something like the suggested fdopen solution is code confusiion. If we add it here, future readers will ask themselves why it was done this way and if it is something that should be done elsewhere too.
-- Björn ------------------------------------------------------------------- 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 2009-12-31 These mail archives are generated by hypermail. |
Page updated November 12, 2010.
web site info