hello,
i'm trying to locate the occurence in a string of a comparison string using srcspn, but it never returns correct results,
Code:
char acc[] = "Accept-Encoding:";
int loc = strcspn(tmp, acc);
where tmp is a char array containing the http request:
GET <request> HTTP/1.1
Host: <host>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.2.9) Gecko/20100824 Firefox/3.6.9
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Proxy-Connection: keep-alive
Cookie: __utma=212617111.289542702.1278157741.1278907954.1 278912107.14; __utmz=212617111.1278907954.13.3.utmcsr=enrol.rmit .edu.au|utmccn=(referral)|utmcmd=referral|utmcct=/eol/AcadHistoryList.asp
Cache-Control: max-age=0
basically what i want to do is remove the Accept-Encoding portion of the http request so my server doesn't receive gzipped files, but strcspn for "Accept-Encoding" returns 1, am i doing something wrong? please help,
regards,