Am 01.11.2011 21:23, schrieb Jim Jagielski:
In mod_proxy_http we have:

     /* Prefetch MAX_MEM_SPOOL bytes
      *
      * This helps us avoid any election of C-L v.s. T-E
      * request bodies, since we are willing to keep in
      * memory this much data, in any case.  This gives
      * us an instant C-L election if the body is of some
      * reasonable size.
      */
     temp_brigade = apr_brigade_create(p, bucket_alloc);
     do {
         status = ap_get_brigade(r->input_filters, temp_brigade,
                                 AP_MODE_READBYTES, APR_BLOCK_READ,
                                 MAX_MEM_SPOOL - bytes_read);
         if (status != APR_SUCCESS) {
             ap_log_error(APLOG_MARK, APLOG_ERR, status, r->server,
                          "proxy: prefetch request body failed to %pI (%s)"
                          " from %s (%s)",
                          p_conn->addr, p_conn->hostname ? p_conn->hostname: "",
                          c->remote_ip, c->remote_host ? c->remote_host: "");
             return HTTP_BAD_REQUEST;
         }

         apr_brigade_length(temp_brigade, 1,&bytes);
         bytes_read += bytes;

However, I see times when status could be APR_EAGAIN. IMO, it doesn't
make sense to error out here in that case. Right?

Why should it be EAGAIN with a blocking read?

Regards

Rüdiger

Reply via email to