From ffefedefa9543f9bbdbf7d93a8a66fe4a6b96a2f Mon Sep 17 00:00:00 2001 From: Xavier Roche Date: Thu, 15 Aug 2013 12:40:06 +0000 Subject: Added %a option, allowing to define the "Accept:" header line. Added %X option, to define additional request header lines. Cleaned up a bit the messy strcat everywhere in the request section (yuk). --- src/htscore.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/htscore.c') diff --git a/src/htscore.c b/src/htscore.c index 8c86914..3315409 100644 --- a/src/htscore.c +++ b/src/htscore.c @@ -830,16 +830,18 @@ int httpmirror(char *url1, httrackp * opt) { // recopier proxy if ((r.req.proxy.active = opt->proxy.active)) { if (StringBuff(opt->proxy.bindhost) != NULL) - strcpybuff(r.req.proxy.bindhost, StringBuff(opt->proxy.bindhost)); + r.req.proxy.bindhost = StringBuff(opt->proxy.bindhost); if (StringBuff(opt->proxy.name) != NULL) - strcpybuff(r.req.proxy.name, StringBuff(opt->proxy.name)); + r.req.proxy.name = StringBuff(opt->proxy.name); r.req.proxy.port = opt->proxy.port; } // et user-agent - strcpy(r.req.user_agent, StringBuff(opt->user_agent)); - strcpy(r.req.referer, StringBuff(opt->referer)); - strcpy(r.req.from, StringBuff(opt->from)); - strcpy(r.req.lang_iso, StringBuff(opt->lang_iso)); + r.req.user_agent = StringBuff(opt->user_agent); + r.req.referer = StringBuff(opt->referer); + r.req.from = StringBuff(opt->from); + r.req.lang_iso = StringBuff(opt->lang_iso); + r.req.accept = StringBuff(opt->accept); + r.req.headers = StringBuff(opt->headers); r.req.user_agent_send = opt->user_agent_send; if (!error) { -- cgit v1.2.3