cURL / Mailing Lists / curl-library / Single Mail

curl-library

Double accept-header upon easy handle reuse

From: Gabriel Kälin <Gabriel.Kaelin_at_visonys.com>
Date: Tue, 12 Aug 2008 14:41:55 +0200

Dear libcurl developers
 
unfortunately I'm not enough familiar with libcurl code and I don't have any time right for providing a simple patch, but I've found what I consider a bug in the usage of the Accept HTTP header and thought I might let you know anyway. Maybe somebody will fix it quickly or I'll provide a patch somewhen later.
 
When you create an easy handle, but don't set the Accept header yourself, libcurl adds an implicit Accept header. Now the problem arises, if for a subsequent request on the easy handle you try to set your custom Accept header, because the request will end with two Accept headers: Yours and the implicit one! Some servers don't like two accept headers at all, while it is confusing at best.
 
Thanks, if somebody gets his hands down on this. :)
 
Gabe
Received on 2008-08-12