   &quot;Aug&quot;,
    &quot;Sep&quot;,
    &quot;Oct&quot;,
    &quot;Nov&quot;,
    &quot;Dec&quot;
  ];

  final int formatRfc1123 = 0;
  final int formatRfc850 = 1;
  final int formatAsctime = 2;

  int index = 0;
  String tmp;
  int format;

  void expect(String s) {
    if (date.length - index &lt; s.length) {
      throw new HttpException(&quot;Invalid HTTP date $date&quot;);
    }
    String tmp = date.substring(index, index + s.length);
    if (tmp != s) {
      throw new HttpException(&quot;Inval