rbb 99/03/17 12:00:42
Modified: pthreads/src/main http_protocol.c
pthreads/src/modules/standard mod_asis.c
Log:
Fix to make mod_asis work in the hybrid server. We used to close the
connection without sending data.
Revision Changes Path
1.12 +5 -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.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- http_protocol.c 1999/03/17 17:01:21 1.11
+++ http_protocol.c 1999/03/17 20:00:40 1.12
@@ -1894,8 +1894,11 @@
else
o = IOBUFSIZE;
- read(fd, buf, o);
-
+ while ((n = read(fd, buf, o)) < 1 &&
+ (errno == EINTR || errno == EAGAIN) &&
+ !ap_is_aborted(r->connection))
+ continue;
+
if (n < 1) {
break;
}
1.4 +3 -1 apache-apr/pthreads/src/modules/standard/mod_asis.c
Index: mod_asis.c
===================================================================
RCS file: /home/cvs/apache-apr/pthreads/src/modules/standard/mod_asis.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- mod_asis.c 1999/02/07 06:29:51 1.3
+++ mod_asis.c 1999/03/17 20:00:41 1.4
@@ -107,8 +107,10 @@
}
ap_send_http_header(r);
- if (!r->header_only)
+ if (!r->header_only) {
+ fseek(f, 0, SEEK_CUR);
ap_send_fd(fileno(f), r);
+ }
ap_pfclose(r->pool, f);
return OK;