jonas <[EMAIL PROTECTED]> writes:
> I have just installed wwwoffle and it works very well. With the 'Censored
> Header' Option it is possible to change an existing header line. I would also
> like to add an additional header line. I'm not so good in C-Programming but
> I think it is only a small change in the file parse.c . With this it would be
> possible for my notebook to act like a mobile phone if it has the same
> headers as a mobile phone sends f.ex. to get wap pages. Some providers only
> allow mobile phones to get them. Can anybody help me?
To force a single header is indeed just a small change in parse.c like
you say. In this case the following change will add a header that
looks like:
X-My-Header: my string
To make it so that this can be configured from the configuration file
is more difficult and needs changes in a lot more files.
-------------------- parse.c.diff --------------------
--- parse.c 2005/04/17 09:33:04 2.127
+++ parse.c 2005/05/25 17:38:34
@@ -672,6 +672,10 @@
AddToHeader(request_head,"User-Agent","WWWOFFLE/" WWWOFFLE_VERSION);
}
+ /* Force the insertion of a header */
+
+ AddToHeader(request_head,"X-My-Header","my string");
+
/* Censor the header */
for(i=0;i<request_head->n;i++)
-------------------- parse.c.diff --------------------
--
Andrew.
----------------------------------------------------------------------
Andrew M. Bishop [EMAIL PROTECTED]
http://www.gedanken.demon.co.uk/
WWWOFFLE users page:
http://www.gedanken.demon.co.uk/wwwoffle/version-2.8/user.html