Commit 0c10777d authored by Garrett Rooney's avatar Garrett Rooney
Browse files

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
parent b4ba32b1
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment