]> granicus.if.org Git - apache/commitdiff
Align with FCGI protocol defines.
authorJim Jagielski <jim@apache.org>
Tue, 3 Jan 2006 14:40:26 +0000 (14:40 +0000)
committerJim Jagielski <jim@apache.org>
Tue, 3 Jan 2006 14:40:26 +0000 (14:40 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/fcgi-proxy-dev@365643 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/fcgi_protocol.h
modules/proxy/mod_proxy_fcgi.c

index e85c9ef1802930d7f81fbec16df160bc3de79d89..5f16808ef5935d6425367c673da3475e77746646 100644 (file)
@@ -52,6 +52,12 @@ typedef struct {
     unsigned char reserved;
 } fcgi_header;
 
+/*
+ * Number of bytes in a fcgi_header.  Future versions of the protocol
+ * will not reduce this number.
+ */
+#define FCGI_HEADER_LEN  8
+
 /*
  * Mask for flags component of FCGI_BeginRequestBody
  */
index fe4267d04f293a318639b1f3e49c6c0d0eb13fd2..f05a08485a1505f70015ba6c39af463551bfc4f4 100644 (file)
@@ -411,19 +411,18 @@ static apr_status_t dispatch(proxy_conn_rec *conn, request_rec *r,
             char plen = 0;
             apr_bucket *b;
             fcgi_header rheader;
-            int rheader_size = sizeof(fcgi_header);
 
             memset(readbuf, 0, sizeof(readbuf));
 
             /* First, we grab the header... */
-            readbuflen = rheader_size;
+            readbuflen = FCGI_HEADER_LEN;
 
             rv = apr_socket_recv(conn->sock, (char *)&rheader, &readbuflen);
             if (rv != APR_SUCCESS) {
                 break;
             }
 
-            if (readbuflen != rheader_size) {
+            if (readbuflen != FCGI_HEADER_LEN) {
                 ap_log_error(APLOG_MARK, APLOG_ERR, 0, r->server,
                              "proxy: FCGI: Failed to read entire header");
                 rv = APR_EINVAL;