Exemplo n.º 1
0
void
JAWS_Headers::remove_all (const char *const &header_name)
{
  JAWS_Header_Data *data;
  int done;

  do
    {
      JAWS_Header_Table_Iterator i (*this);
      i.first ();
      done = 1;
      while (! i.done ())
        {
          data = i.next ();
          if (data != 0
              && ACE_OS::strcasecmp (data->header_name (), header_name) == 0)
            {
              i.remove ();
              delete data;
              done = 0;
              break;
            }
          else
            i.advance ();
        }
    }
  while (! done);
}
Exemplo n.º 2
0
const char *
HTTP_Headers::value_next (int index)
{
  const char *hs = 0;
  const char *hv = 0;
  JAWS_Header_Data *data;

  if (0 <= index && index < NUM_HEADER_STRINGS)
    {
      hs = this->header (index);
      data = this->table ()->find_next (hs);
      if (data != 0)
        hv = data->header_value ();
    }

  return hv;
}
Exemplo n.º 3
0
void
JAWS_Header_Info::dump (void)
{
  JAWS_Header_Table_Iterator iter (this->table_);

  ACE_DEBUG ((LM_DEBUG, "== BEGIN HEADER INFO DUMP ==\n"));
  for (iter.first (); ! iter.done (); iter.advance ())
    {
      JAWS_Header_Data *data;
      data = iter.next ();
      if (data != 0)
        ACE_DEBUG ((LM_DEBUG,
                    "%s -- %s\n",
                    data->header_name (), data->header_value ()));
      else
        ACE_DEBUG ((LM_DEBUG, "NULL ENTRY\n"));
    }
  ACE_DEBUG ((LM_DEBUG, "== END HEADER INFO DUMP ==\n"));
}
Exemplo n.º 4
0
JAWS_Header_Data *
JAWS_Headers::find_next (const char *const &header_name)
{
  JAWS_Header_Data *data = 0;
  JAWS_Header_Table_Iterator &i = this->iter_;

  while (! i.done ())
    {
      data = i.next ();
      if (data != 0)
        {
          if (ACE_OS::strcasecmp (data->header_name (), header_name) != 0)
            data = 0;
        }
      i.advance ();
      if (data != 0)
        break;
    }

  return data;
}