Re: Extra headers for POST

At 11:40 1/5/99 -0600, olga wrote:

>I need to add extra headers for the POST request and it doesn't work. The
>callback function which should generate the headers is never called. Am I
>doing something wrong? 

Try

	HTList * generators = HTList_new();
	HTGenerator_add(generators, post_header_gen);
	HTRequest_setGenerator(request, generators, NO); //??? YES - NO

instead of 

>    HTList * generators = HTRequest_generator(request, &override);
>    HTGenerator_add(generators, post_header_gen);
>    HTRequest_setGenerator(request, generators, NO); //??? YES - NO

I must admit that this is not a nice interface. The reason for this is that
we have been working on a real extension framework for HTTP which allows
you to describe how a message is extended:

http://www.w3.org/Protocols/HTTP/ietf-http-ext/draft-frystyk-http-extensions
-01

The plan is to have Eric Prud'hommeaux helping implement this shortly. If
you can get by in the mean time then this would be the easiest. Otherwise
we can add an association list to the request where the requester can add a
new header name and value pair and then have the library stuff them into
the request.

Henrik
--
Henrik Frystyk Nielsen,
World Wide Web Consortium
http://www.w3.org/People/Frystyk

Received on Tuesday, 5 January 1999 14:53:07 UTC