Commit graph

2 commits

Author SHA1 Message Date
Max Semenik
986fe3bd33 PHP 7.4 fixes
All errors currently seen in Travis:
* Function ReflectionType::__toString() is deprecated
* Trying to access array offset on value of type null
* Array and string offset access syntax with curly braces is
  deprecated

Bug: T233012
Change-Id: I9619fcae5dd8b633f8c579b924aec311343da880
2019-11-22 09:49:56 +00:00
Tim Starling
558471f044 Conditional request support
* Added ConditionalHeaderUtil, a conditional request helper class meant
  for composition into Handler. I evaluated the composer package
  micheh/psr7-cache for this role but I decided that I prefer DIY
  code rather than some rather ugly glue.
* Check conditional request headers prior to entry into
  Handler::execute(). Contrary to what was previously documented, use
  the results of getLastModified() and getETag() to set headers in the
  response. This is convenient and can be overridden in the Handler if
  desired by overriding a one-line function.
* Instead of locking up header parsing inside ConditionalHeaderUtil as
  was done in micheh/psr7-cache, make a start on a new reusable header
  parsing framework, with recursive descent parsers for HTTP-date and
  IfNoneMatch.

Change-Id: I260809081cad7701df8620ab03834158670d4230
2019-10-14 12:01:25 +11:00