License:
BSD style: see license.txt

Version:
Initial release: April 2004

author:
Kris

  • struct HeaderElement ;
  • Exposes freachable HttpHeader instances

  • class HttpHeadersView : tango.net.http.HttpTokens.HttpTokens;
  • Maintains a set of input headers. These are placed into an input buffer and indexed via a HttpStack.

  • this();
  • Construct this set of headers, using a HttpStack based upon a ':' delimiter

  • this(HttpHeadersView source);
  • Clone a source set of HttpHeaders

  • HttpHeadersView clone ();
  • Clone this set of HttpHeadersView

  • void parse (IBuffer input);
  • Read all header lines. Everything is mapped rather than being allocated & copied

  • char[] get (HttpHeaderName name, char[] def = null);
  • Return the value of the provided header, or null if the header does not exist

  • int getInt (HttpHeaderName name, int def = -1);
  • Return the integer value of the provided header, or -1 if the header does not exist

  • Time getDate (HttpHeaderName name, Time def = epoch);
  • Return the date value of the provided header, or Time.epoch if the header does not exist

  • int opApply (int delegate(ref HeaderElement ) dg);
  • Iterate over the set of headers. This is a shell around the superclass, where we can convert the HttpToken into a HeaderElement instead.

  • FilteredHeaders createFilter (HttpHeaderName header);
  • Create a filter for iterating of a set of named headers. We have to create a filter since we can't pass additional arguments directly to an opApply() method.

  • class HttpHeaders : tango.net.http.HttpHeaders.HttpHeadersView;
  • Maintains a set of output headers. These are held in an output buffer, and indexed via a HttpStack. Deleting a header could be supported by setting the HttpStack entry to null, and ignoring such values when it's time to write the headers.

  • this(IBuffer output);
  • Construct output headers, using the provided buffer as a place to stash the header content.

  • this(HttpHeaders source);
  • Clone a source set of HttpHeaders

  • HttpHeaders clone ();
  • Clone this set of HttpHeaders

  • void add (HttpHeaderName name, void delegate(IBuffer) dg);
  • Add the specified header, and use a callback to provide the content.

  • void add (HttpHeaderName name, char[] value);
  • Add the specified header and text

  • void addInt (HttpHeaderName name, int value);
  • Add the specified header and integer value

  • void addDate (HttpHeaderName name, Time value);
  • Add the specified header and long/date value

  • bool remove (HttpHeaderName name);
  • Remove the specified header header. Returns false if not found.

  • IBuffer getOutputBuffer ();
  • Return the output buffer provided during construction.

    Copyright (c) 2004 Kris Bell. All rights reserved :: page rendered by CandyDoc