You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Greg Stein <gs...@lyra.org> on 2000/01/12 23:39:07 UTC
Re: cvs commit: apache-2.0/src/main http_protocol.c http_request.c
How much of this applies to 1.3? For example, the rnew->chunked thing.
Cheers,
-g
On 12 Jan 2000 rbb@hyperreal.org wrote:
> rbb 00/01/12 10:20:45
>
> Modified: src/main http_protocol.c http_request.c
> Log:
> Fix some remaining problems with SSI's and Windows. Basically, the
> sendfile stuff doesn't work properly with chuncked data.
> Submitted by: Allan Edwards
> Reviewed by: Ryan Bloom
>
> Revision Changes Path
> 1.47 +14 -9 apache-2.0/src/main/http_protocol.c
>
> Index: http_protocol.c
> ===================================================================
> RCS file: /home/cvs/apache-2.0/src/main/http_protocol.c,v
> retrieving revision 1.46
> retrieving revision 1.47
> diff -u -r1.46 -r1.47
> --- http_protocol.c 2000/01/09 05:18:23 1.46
> +++ http_protocol.c 2000/01/12 18:20:43 1.47
> @@ -2016,16 +2016,21 @@
> {
> long len;
> #ifdef HAVE_SENDFILE
> - ap_bflush(r->connection->client);
> - if (ap_get_filesize(&len, fd) != APR_SUCCESS) {
> - ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
> - "ap_send_fd: ap_get_filesize failed.");
> - return 0;
> + if (!r->chunked) {
> + ap_bflush(r->connection->client);
> + if (ap_get_filesize(&len, fd) != APR_SUCCESS) {
> + ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
> + "ap_send_fd: ap_get_filesize failed.");
> + return 0;
> + }
> + if (iol_sendfile(r->connection->client->iol, fd, len,
> + NULL, 0, 0) != APR_SUCCESS) {
> + ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
> + "ap_send_fd: iol_sendfile failed.");
> + }
> }
> - if (iol_sendfile(r->connection->client->iol, fd, len,
> - NULL, 0, 0) != APR_SUCCESS) {
> - ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, 0, r,
> - "ap_send_fd: iol_sendfile failed.");
> + else {
> + len = ap_send_fd_length(fd, r, -1);
> }
> #else
> len = ap_send_fd_length(fd, r, -1);
>
>
>
> 1.16 +1 -0 apache-2.0/src/main/http_request.c
>
> Index: http_request.c
> ===================================================================
> RCS file: /home/cvs/apache-2.0/src/main/http_request.c,v
> retrieving revision 1.15
> retrieving revision 1.16
> diff -u -r1.15 -r1.16
> --- http_request.c 2000/01/10 15:35:49 1.15
> +++ http_request.c 2000/01/12 18:20:43 1.16
> @@ -845,6 +845,7 @@
> rnew->server = r->server;
> rnew->request_config = ap_create_request_config(rnew->pool);
> rnew->htaccess = r->htaccess;
> + rnew->chunked = r->chunked;
>
> ap_set_sub_req_protocol(rnew, r);
> fdir = ap_make_dirstr_parent(rnew->pool, r->filename);
>
>
>
>
--
Greg Stein, http://www.lyra.org/
RE: cvs commit: apache-2.0/src/main http_protocol.c http_request.c
Posted by Allan Edwards <ak...@raleigh.ibm.com>.
>
> How much of this applies to 1.3? For example, the rnew->chunked thing.
>
> Cheers,
> -g
>
Greg, this is fix is specific to 2.0 and required because we are taking
advantage of TransmitFile on NT, and the HAVE_SENDFILE path doesn't handle
chunking. This broke SSI #include file. I don't know of any reason for 1.3
needing the new->chunked thing.
Allan