cURL / Mailing Lists / curl-library / Single Mail

curl-library

fixing schemes and domains on the fly

From: Yaroslav Samchuk <yarcat_at_ank-sia.com>
Date: Tue, 16 Oct 2007 17:37:26 +0300

Hello,

I'd like to point that links to mailman, python-powered and gnu-head-
tiny pictures are broken (noticed during the mailing-list
subscription process). At least they were broken for me.

I have the question which basically is defined in the subject. I have
a proxy-like application, which receives some queries, converts them
into http requests, sends to http server, receives a response and
sends back using originator's protocol.

Everything would be nice if I wouldn't have to handle redirects on
proxy side. The problem is that I have to handle cookies as well (but
for the original domain only) and I have to tweak domains and
schemes. Every domain and scheme I receive from http servers (even
together with "Location:" header) is kind of encoded. I have to
decode these values, patch "Set-Cookie:" to correspond to decoded
domains, follow all redirects and only than I can return the response
(together with all new cookies for the original domain).

Do anyone have an idea what is the best place to do this? I already
spent some time reading the code and trying to patch libCURL to have
required callbacks, but still wanna ask creators - may be I have
missed something and there is an at least semi-legal way to do this
strange stuff in the library? Or may be any suggestion about the
functions I have to patch (this would probably save me half of the
day tomorrow)...

Waiting for replay asap - I really was in need of this feature
already yesterday :-S
Thanks in advance.

--
Best regards,
Yaroslav Samchuk
Received on 2007-10-16