cURL / Mailing Lists / curl-library / Single Mail

curl-library

Content-type header bug

From: James Bursa <bursa_at_users.sourceforge.net>
Date: Tue, 08 Apr 2003 12:50:04 +0100

If a server returns a header like

  Content-Type:text/html

without a space after the ':', the data returned by

  curl_easy_getinfo(curl_handle, CURLINFO_CONTENT_TYPE, &type)

has the first character missing, eg. "ext/html".

This patch fixes it:

--- lib/transfer.c 26 Feb 2003 12:42:25 -0000 1.143
+++ lib/transfer.c 8 Apr 2003 11:33:12 -0000
@@ -568,7 +568,7 @@
               int len;
               
               /* Find the first non-space letter */
- for(start=k->p+14;
+ for(start=k->p+13;
                   *start && isspace((int)*start);
                   start++);

James

-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
Received on 2003-04-08