cvs commit: apache-apr/pthreads/src/main http_protocol.c

1999-03-04 Thread manoj
manoj   99/03/03 16:07:00

  Modified:pthreads/src/main http_protocol.c
  Log:
  Allow the code to compile on AIX.
  
  Revision  ChangesPath
  1.8   +2 -2  apache-apr/pthreads/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===
  RCS file: /home/cvs/apache-apr/pthreads/src/main/http_protocol.c,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -u -r1.7 -r1.8
  --- http_protocol.c   1999/02/26 16:37:20 1.7
  +++ http_protocol.c   1999/03/04 00:06:58 1.8
  @@ -956,8 +956,8 @@
   else if (rv == -1) { 
   ap_bclose(r-connection-client);
   ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
  - Timeout hasn't occured, but something is wrong,
  -  closing the connection.);
  + Timeout hasn't occured, but something is wrong, 
  + closing the connection.);
   }
   else {
   if (filedes-revents = POLLIN) {
  
  
  


cvs commit: apache-apr/pthreads/src/main http_protocol.c

1999-02-26 Thread rbb
rbb 99/02/26 08:37:22

  Modified:pthreads/src/main http_protocol.c
  Log:
  Inserted some error handling code, and got rid of a nasty infinite loop.  
Stupid
  errno not getting reset when I thought it was.  This should fix the timeout
  code.
  
  Revision  ChangesPath
  1.7   +21 -3 apache-apr/pthreads/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===
  RCS file: /home/cvs/apache-apr/pthreads/src/main/http_protocol.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- http_protocol.c   1999/02/25 13:43:36 1.6
  +++ http_protocol.c   1999/02/26 16:37:20 1.7
  @@ -903,6 +903,7 @@
   const char *expect;
   int access_status;
   struct pollfd *filedes;
  +int timeout, rv;
   
   filedes = (struct pollfd *)malloc(sizeof(struct pollfd));
   p = ap_make_sub_pool(conn-pool);
  @@ -941,16 +942,33 @@
   
   /* Get the request... */
   ap_bnonblock(r-connection-client, B_RD);
  +errno = 0;
   while (!read_request_line(r)) {
   if (errno == EAGAIN) {
  +errno = 0;
   filedes-fd = ap_bfileno(r-connection-client, B_RD);
   filedes-events = POLLIN; 
   filedes-revents = 0; 
  -if (poll(filedes, 1, ap_get_timeout(r)) == 0) {
  +timeout = ap_get_timeout(r);
  +if ((rv = poll(filedes, 1, timeout)) == 0) {
   ap_bclose(r-connection-client);
   }
  -else {
  -continue;
  +else if (rv == -1) { 
  +ap_bclose(r-connection-client);
  +ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
  + Timeout hasn't occured, but something is wrong,
  +  closing the connection.);
  +}
  +else {
  +if (filedes-revents = POLLIN) {
  +continue;
  +}
  +else {
  +ap_bclose(r-connection-client);
  +ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
  +  Event other than POLLIN, closing 
connection.);
  +}
  +
   }
   }
   if (r-status == HTTP_REQUEST_URI_TOO_LARGE) {
  
  
  


cvs commit: apache-apr/pthreads/src/main http_protocol.c

1999-02-05 Thread manoj
manoj   99/02/04 23:55:25

  Modified:pthreads/src/main http_protocol.c
  Log:
  Fix (I think) a bug where pipes could be closed even if there is still data to
  send, so only part of a CGI's output would sometimes be sent.
  
  Revision  ChangesPath
  1.3   +2 -2  apache-apr/pthreads/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===
  RCS file: /home/cvs/apache-apr/pthreads/src/main/http_protocol.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -u -r1.2 -r1.3
  --- http_protocol.c   1999/02/04 06:52:39 1.2
  +++ http_protocol.c   1999/02/05 07:55:24 1.3
  @@ -1876,7 +1876,7 @@
   #endif
   if (ap_is_aborted(r-connection))
   break;
  -if (n  0 /*  errno != EAGAIN ZZZ rethink for threaded impl */)
  +if (n  0  errno != EAGAIN /* ZZZ rethink for threaded impl */)
   break;
   /* we need to block, so flush the output first */
   ap_bflush(r-connection-client);
  @@ -1909,7 +1909,7 @@
   else if (w  0) {
   if (ap_is_aborted(r-connection))
   break;
  -#if 0   /*rethink for threaded impl */
  +#if 1   /*rethink for threaded impl */
   else if (errno == EAGAIN)
   continue;
   #endif