Android 中的微型云
2010-04-09 05:40:00 来源:WEB开发网核心提示:') mainbuf[i]='*'; aclog(LOG, "request", mainbuf, hit); for(i=4; i < SBUF; i++) { if(m
')
mainbuf[i]='*';
aclog(LOG, "request", mainbuf, hit);
for(i=4; i < SBUF; i++)
{
if(mainbuf[i] == ' ')
{
mainbuf[i]=0;
break;
}
}
if(!strncmp(&mainbuf[0], "GET /", 6) ||
!strncmp(&mainbuf[0], "get /", 6))
{
htmlout(fd, fileList());
}
else
{
if(!strncmp(&mainbuf[5], "About_", 6))
{
htmlout(fd, about);
}
else if(!strncmp(&mainbuf[5], "Home_", 5))
{
htmlout(fd, fileList());
}
else if(!strncmp(&mainbuf[5], "CD_", 3))
{
if(chdir(&mainbuf[8]) == -1)
{
error404(fd);
}
else
{
if(strcmp(theDir, &mainbuf[8]))
strcpy(theDir, &mainbuf[8]);
htmlout(fd, fileList());
}
}
else
{
retfile(fd, hit);
}
}
}
free(theDir);
free(theList);
free(mainbuf);
sleep(1);
exit(1);
}
mainbuf[i]='*';
aclog(LOG, "request", mainbuf, hit);
for(i=4; i < SBUF; i++)
{
if(mainbuf[i] == ' ')
{
mainbuf[i]=0;
break;
}
}
if(!strncmp(&mainbuf[0], "GET /", 6) ||
!strncmp(&mainbuf[0], "get /", 6))
{
htmlout(fd, fileList());
}
else
{
if(!strncmp(&mainbuf[5], "About_", 6))
{
htmlout(fd, about);
}
else if(!strncmp(&mainbuf[5], "Home_", 5))
{
htmlout(fd, fileList());
}
else if(!strncmp(&mainbuf[5], "CD_", 3))
{
if(chdir(&mainbuf[8]) == -1)
{
error404(fd);
}
else
{
if(strcmp(theDir, &mainbuf[8]))
strcpy(theDir, &mainbuf[8]);
htmlout(fd, fileList());
}
}
else
{
retfile(fd, hit);
}
}
}
free(theDir);
free(theList);
free(mainbuf);
sleep(1);
exit(1);
}
更多精彩
赞助商链接