]> git.ipfire.org Git - thirdparty/apache/httpd.git/commit
Make the handling of FastCGI request headers consistent. Previously, we
authorGarrett Rooney <rooneg@apache.org>
Sat, 7 Jan 2006 21:37:40 +0000 (21:37 +0000)
committerGarrett Rooney <rooneg@apache.org>
Sat, 7 Jan 2006 21:37:40 +0000 (21:37 +0000)
commit1dff619619d3566a27d5d244b6cf902c3abbf019
treeaf009fec90a9a99b5724d14a54b9377ac3aad59e
parent9930639028c33c072b1907b93785cabc2d17e79c
Make the handling of FastCGI request headers consistent.  Previously, we
used a struct to hold the data when writing it, but read it into an array
when reading it.  This meant that the knowledge of the header layout was
in two places.  This change moves both sides to using an array, and adds
a set of #defines for the offsets into the array, so neither side can get
out of sync.

This also moves the logic for setting up the content length bytes into one
place, where before we had it in several places.

* modules/proxy/fcgi_protocol.h
  (fcgi_header): Removed.
  (FCGI_HDR_VERSION_OFFSET,
   FCGI_HDR_TYPE_OFFSET,
   FCGI_HDR_REQUEST_ID_B1_OFFSET,
   FCGI_HDR_REQUEST_ID_B0_OFFSET,
   FCGI_HDR_CONTENT_LEN_B1_OFFSET,
   FCGI_HDR_CONTENT_LEN_B0_OFFSET,
   FCGI_HDR_PADDING_LEN_OFFSET,
   FCGI_HDR_RESERVED_OFFSET): New constants.

* modules/proxy/mod_proxy_fcgi.c
  (fill_in_header): Take an array, not a struct pointer, and handle all
   the contents of the header, not just the type and request id.
  (send_begin_request, send_environment, dispatch): Update for new way
   to fill in headers.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/fcgi-proxy-dev@366926 13f79535-47bb-0310-9956-ffa450edef68
modules/proxy/fcgi_protocol.h
modules/proxy/mod_proxy_fcgi.c