cURL / Mailing Lists / curl-library / Single Mail


My personal pitfalls (or: too magic?)

From: Michael Wallner <>
Date: Fri, 11 Nov 2005 14:27:02 +0100

This may sound like a rant, but is hopefully the beginning of something constructive :)

I feel very inconvenient with some of libcurls magic habits.
It currently seems impossible to me to squeeze data with standard
methodology out of libcurl that can be properly serialized/deserialized,
here's why:

- no raw callback (most of the following points could probably be solved with that)
- no response bodies for redirects are provided
- no real indicator if the data already is from a following response when redirected
- compressed data is inflated without updating headers (I can't force libcurl not to inflate)
- chunked encoded data is decoded without updating headers (I can't force libcurl not to decode)

My current way to overcome these issues is to abuse the debug callback as kind of a raw callback,
which means that libcurl does many things I do afterwards anyway (or vice versa depending on POV).
I could easily understand if curl did all those things but I don't yet get why libcurl is doing it.

Thanks for listening,

Michael - <mike(@)>
Received on 2005-11-11