int c;
while(!file.done)
{
+ bool gotEndLine = false;
for(c = 0; c<count-1; c++)
{
if(buffer[c] == '\r' && buffer[c+1] == '\n')
+ {
+ gotEndLine = true;
break;
+ }
}
+ if(!gotEndLine)
+ // Incomplete packet
+ return pos;
if(c<count)
{
char * string = (char *)buffer;
fwrite(buffer, 1, c, stdout);
puts("");
*/
-
+
if(!c)
{
//if(file.openStarted)
strcat(msg, server);
strcat(msg, "\r\n");
strcat(msg, "Accept-Charset: ISO-8859-1\r\n");
+ //strcat(msg, "Accept-Charset: UTF-8\r\n");
+ strcat(msg, "Connection: Keep-Alive\r\n");
if(referer)
{
strcat(msg, "Referer: ");