upnphttp.c: remove strchr() call in ParseHttpHeaders()
This commit is contained in:
parent
72e570186c
commit
ea141830f6
|
@ -2,6 +2,7 @@ $Id: Changelog.txt,v 1.322 2013/01/29 21:52:44 nanard Exp $
|
||||||
|
|
||||||
2013/01/29:
|
2013/01/29:
|
||||||
upnphttp.c: Fix and comment the findendheaders() function
|
upnphttp.c: Fix and comment the findendheaders() function
|
||||||
|
upnphttp.c: remove strchr() call in ParseHttpHeaders()
|
||||||
|
|
||||||
2013/01/27:
|
2013/01/27:
|
||||||
upnphttp.c: ParseHttpHeaders() now checks atoi() return
|
upnphttp.c: ParseHttpHeaders() now checks atoi() return
|
||||||
|
|
|
@ -83,7 +83,16 @@ ParseHttpHeaders(struct upnphttp * h)
|
||||||
/* TODO : check if req_buf, contentoff are ok */
|
/* TODO : check if req_buf, contentoff are ok */
|
||||||
while(line < (h->req_buf + h->req_contentoff))
|
while(line < (h->req_buf + h->req_contentoff))
|
||||||
{
|
{
|
||||||
colon = strchr(line, ':');
|
colon = line;
|
||||||
|
while(*colon != ':')
|
||||||
|
{
|
||||||
|
if(*colon == '\r' || *colon == '\n')
|
||||||
|
{
|
||||||
|
colon = NULL; /* no ':' character found on the line */
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
colon++;
|
||||||
|
}
|
||||||
if(colon)
|
if(colon)
|
||||||
{
|
{
|
||||||
if(strncasecmp(line, "Content-Length", 14)==0)
|
if(strncasecmp(line, "Content-Length", 14)==0)
|
||||||
|
|
Loading…
Reference in New Issue