Hi,

on 30/07/2009 20.29 Przemyslaw Czerpak wrote:
BTW why did you use different stop condtions in current readRequest()
    code instead of exact replication of above socket_*() code, i.e:

      cRequest := ""
      nLen     := 1
      cBuf     := Space( 4096 )
      DO WHILE AT( CR_LF + CR_LF, cRequest ) == 0 .AND. nLen > 0
         nLen := hb_InetRecv( hSocket, @cBuf )
         cRequest += Left( cBuf, nLen )
      ENDDO

   ???

ah, probably this was the difference between inet and custom version (I have to remember better). Because the above read only first part without reading "CONTENT-LENGTH:" string that is after CR + LF + CR + LF part. In inet version CR + LF + CR + LF will not read as inet doesn't return CR + LF, so AT( CR_LF + CR_LF, cRequest ) == 0 will be always true.
Infact I have commented that check.
But as I wrote before I have to refresh the code better in my mind.

Best Regards,
Francesco

_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to