On Sun, Jun 28, 2020 at 1:41 AM <minf...@apache.org> wrote: > > Author: minfrin > Date: Sat Jun 27 23:41:00 2020 > New Revision: 1879285 > > URL: http://svn.apache.org/viewvc?rev=1879285&view=rev [] > --- httpd/httpd/trunk/include/httpd.h (original) > +++ httpd/httpd/trunk/include/httpd.h Sat Jun 27 23:41:00 2020 [] > +/** > + * @defgroup bnotes Binary notes recognized by the server > + * @ingroup APACHE_CORE_DAEMON > + * @{ > + * > + * @brief Binary notes recognized by the server. > + */ > + > +/** > + * The type used for request binary notes. > + */ > +typedef apr_uint64_t ap_request_bnotes_t; > + > +/** > + * These constants represent bitmasks for notes associated with this > + * request. There are space for 64 bits in the apr_uint64_t. > + * > + */ > +#define AP_REQUEST_STRONG_ETAG 1 >> 0 > + > +/** > + * This is a convenience macro to ease with getting specific request > + * binary notes. > + */ > +#define AP_REQUEST_GET_BNOTE(r, mask) \ > + ((mask) & ((r)->bnotes)) > + > +/** > + * This is a convenience macro to ease with setting specific request > + * binary notes. > + */ > +#define AP_REQUEST_SET_BNOTE(r, mask, val) \ > + (r)->bnotes = (((r)->bnotes & ~(mask)) | (val)) > + > +/** > + * Returns true if the strong etag flag is set for this request. > + */ > +#define AP_REQUEST_IS_STRONG_ETAG(r) \ > + AP_REQUEST_GET_BNOTE((r), AP_REQUEST_STRONG_ETAG) > +/** @} */ > + > > /** > * @defgroup module_magic Module Magic mime types > @@ -1097,6 +1138,11 @@ struct request_rec { > * TODO: compact elsewhere > */ > unsigned int flushed:1; > + /** Request flags associated with this request. Use > + * AP_REQUEST_GET_FLAGS() and AP_REQUEST_SET_FLAGS() to access > + * the elements of this field. > + */ > + ap_request_bnotes_t bnotes; > };
Can't we use a single bitfield (like "flushed" above) for the single AP_REQUEST_STRONG_ETAG flag? Regards; Yann.