Hi guys,

I noticed that there is a little rare bug in the httpinput module.
In the file httpinput.cpp you can find the following code :

char* cp = strstr(buffer, "\n\n");

if(cp)
  cp += 2;
else
{
  cp = strstr(buffer, "\r\n\r\n");
  if(cp)
   cp += 4;
}

Well it happens that some http servers can start to send data right after
the http header in the same buffer.
It can also happen that the first byte of the data being transfered
corresponds to "\n" (0x0A)
In that case, if the header is terminated with "\r\n\r\n", the first byte of
data will be skipped over by the code shown below.
One fix would be to test first for the "\r\n\r\n" termination. Another would
be to test for both, etc...

Sylvain

_______________________________________________
[EMAIL PROTECTED]
http://www.freeamp.org/mailman/listinfo/freeamp-dev

Reply via email to