- From: olga <olga@goliath.eai.com>
- Date: Tue, 05 Jan 1999 11:40:15 -0600 (CST)
- To: www-lib@w3.org
Hi, 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? Thanks, Olga Antropova. -------------------------------------------------------------- There is my code: /////////////////// callback int post_header_gen (HTRequest * request, HTStream * stream) { char headers[1024]; ... cerr << "\n======== post_header_gen: header = " << headers << endl; (*stream->isa->put_block)(stream, headers, strlen(headers)); (*stream->isa->_free)(stream); return HT_OK; } ////////////////// postURL BOOL postURL(const char* server/* where to post */, int port, const char* url /* url of the script */, const char* local_filename /*what to post */) { ... //Set additional headers - add header generator BOOL override; HTList * generators = HTRequest_generator(request, &override); HTGenerator_add(generators, post_header_gen); HTRequest_setGenerator(request, generators, NO); //??? YES - NO ... // start POST request BOOL status = HTPostAnchor(src, dst, request); return status; }
Received on Tuesday, 5 January 1999 14:10:07 UTC