I'd leave this in, but as an if test - eg.

if (expires_hdr != NULL)
{
   // Update the default expires value based on the expires header.
  default_expires = expires_hdr->ivalue;
}

Makes the code in the loop simpler (and slightly more efficient as a bonus).  There's nothing wrong with modifying the value of an input parameter in C/C++.