ben         99/06/20 05:25:55

  Modified:    mpm/src/main buff.c http_request.c
  Log:
  Handle partial large writes.
  
  Revision  Changes    Path
  1.4       +5 -1      apache-2.0/mpm/src/main/buff.c
  
  Index: buff.c
  ===================================================================
  RCS file: /export/home/cvs/apache-2.0/mpm/src/main/buff.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- buff.c    1999/06/18 23:34:59     1.3
  +++ buff.c    1999/06/20 12:25:54     1.4
  @@ -551,7 +551,11 @@
    */
       if (fb->outcnt > 0 && nbyte > LARGE_WRITE_THRESHOLD
        && nbyte + fb->outcnt >= fb->bufsiz) {
  -     return large_write(fb, buf, nbyte);
  +     int n=large_write(fb, buf, nbyte);
  +     if (n == nbyte)
  +         return nbyte;
  +     buf+=n;
  +     nbyte-=n;
       }
   
   /*
  
  
  
  1.3       +7 -1      apache-2.0/mpm/src/main/http_request.c
  
  Index: http_request.c
  ===================================================================
  RCS file: /export/home/cvs/apache-2.0/mpm/src/main/http_request.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- http_request.c    1999/06/18 23:35:00     1.2
  +++ http_request.c    1999/06/20 12:25:54     1.3
  @@ -1241,7 +1241,13 @@
        * it's the application that's stalled.
        */
       /* TODO: re-implement ap_bhalfduplex... not sure how yet */
  -    //ap_bhalfduplex(r->connection->client);
  +#if 0
  +    ap_bhalfduplex(r->connection->client);
  +#else
  +    //in the meantime, flush!
  +    ap_bflush(r->connection->client);
  +#endif
  +
       ap_log_transaction(r);
   }
   
  
  
  

Reply via email to