On Fri, 31 Jul 2009, Francesco Saverio Giudice wrote: 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. Thank you for your answer. I already analyzed this code and replayed myself to this list a minute ago before I've seen your message. Please read it and take corrected version of readRequest() from the message I sent. best regards, Przemek _______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour