Diff
Not logged in

Differences From:

File src/http.c part of check-in [31824fbf91] - Add a "User-Agent" header to the HTTP traffic generated by fossil. The user-agent string is "Fossil/$UUID". by dan on 2008-07-26 16:51:46. [view]

To:

File src/http.c part of check-in [c12e5b102e] - On windows, a recv() call fails if the return value is less than or equal to zero. Ticket 66cbcd56a229f33af6b9a6329a7 by drh on 2008-11-27 13:50:41. [view]

@@ -153,9 +153,9 @@
 ** of the blob is discarded, not freed.
 **
 ** The function was placed here in http.c due to it's socket
 ** nature and we did not want to introduce socket headers into
-** the socket netural blob.c file.
+** the socket neutral blob.c file.
 */
 int socket_read_blob(Blob *pBlob, int pSockId, int nToRead){
   int i=0,read=0;
   char rbuf[50];
@@ -162,9 +162,9 @@
   blob_zero(pBlob);
   while ( i<nToRead ){
     read = recv(pSockId, rbuf, 50, 0);
     i += read;
-    if( read<0 ){
+    if( read<=0 ){
       return 0;
     }
     blob_append(pBlob, rbuf, read);
   }