cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Re: Set content-type for http post upload file not possible

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Thu, 13 Dec 2007 01:10:23 +0100 (CET)

On Wed, 12 Dec 2007, Morgan Galpin wrote:

Please don't top-post, it makes reading this mail thread very confusing.

> It seems to me that curl is about automating tasks.

curl and PHP/CURL very often are, yes. libcurl however is not about automating
tasks, it is about doing file transfers.

> Would it not be easier for curl users if curl was able to automatically
> determine the content type of files rather than requiring users to determine
> the content type themselves and manually set it?

Yes it would, and therefore I could very well imagine curl doing that, but not
libcurl.

> There is already a function in libcurl that returns the content type for a
> given file name. It is logical to me that this function should be able to
> return the content type for more than 5 hard-coded types.

They're only still present in the library because of historic reasons. I'm not
particularly fond of that solution.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2007-12-13