Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Private Attributes
nsHttpRequestHead Class Reference

#include <nsHttpRequestHead.h>

Collaboration diagram for nsHttpRequestHead:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 nsHttpRequestHead ()
 ~nsHttpRequestHead ()
void SetMethod (nsHttpAtom method)
void SetVersion (nsHttpVersion version)
void SetRequestURI (const nsCSubstring &s)
nsHttpHeaderArrayHeaders ()
nsHttpAtom Method ()
nsHttpVersion Version ()
const nsCSubstringRequestURI ()
const char * PeekHeader (nsHttpAtom h)
nsresult SetHeader (nsHttpAtom h, const nsACString &v, PRBool m=PR_FALSE)
nsresult GetHeader (nsHttpAtom h, nsACString &v)
void ClearHeader (nsHttpAtom h)
void ClearHeaders ()
void Flatten (nsACString &, PRBool pruneProxyHeaders=PR_FALSE)

Private Attributes

nsHttpHeaderArray mHeaders
nsHttpAtom mMethod
nsHttpVersion mVersion
nsCString mRequestURI

Detailed Description

Definition at line 52 of file nsHttpRequestHead.h.


Constructor & Destructor Documentation

Definition at line 55 of file nsHttpRequestHead.h.

: mMethod(nsHttp::Get), mVersion(NS_HTTP_VERSION_1_1) {}

Definition at line 56 of file nsHttpRequestHead.h.

{}

Member Function Documentation

Definition at line 70 of file nsHttpRequestHead.h.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 71 of file nsHttpRequestHead.h.

{ mHeaders.Clear(); }

Here is the call graph for this function:

void nsHttpRequestHead::Flatten ( nsACString &  buf,
PRBool  pruneProxyHeaders = PR_FALSE 
)

Definition at line 46 of file nsHttpRequestHead.cpp.

{
    // note: the first append is intentional.
 
    buf.Append(mMethod.get());
    buf.Append(' ');
    buf.Append(mRequestURI);
    buf.AppendLiteral(" HTTP/");

    switch (mVersion) {
    case NS_HTTP_VERSION_1_1:
        buf.AppendLiteral("1.1");
        break;
    case NS_HTTP_VERSION_0_9:
        buf.AppendLiteral("0.9");
        break;
    default:
        buf.AppendLiteral("1.0");
    }

    buf.AppendLiteral("\r\n");

    mHeaders.Flatten(buf, pruneProxyHeaders);
}

Here is the call graph for this function:

Here is the caller graph for this function:

nsresult nsHttpRequestHead::GetHeader ( nsHttpAtom  h,
nsACString &  v 
) [inline]

Definition at line 69 of file nsHttpRequestHead.h.

{ return mHeaders.GetHeader(h, v); }

Here is the call graph for this function:

Definition at line 62 of file nsHttpRequestHead.h.

{ return mHeaders; }

Here is the caller graph for this function:

Definition at line 63 of file nsHttpRequestHead.h.

{ return mMethod; }

Here is the caller graph for this function:

Definition at line 67 of file nsHttpRequestHead.h.

{ return mHeaders.PeekHeader(h); }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 65 of file nsHttpRequestHead.h.

{ return mRequestURI; }
nsresult nsHttpRequestHead::SetHeader ( nsHttpAtom  h,
const nsACString &  v,
PRBool  m = PR_FALSE 
) [inline]

Definition at line 68 of file nsHttpRequestHead.h.

{ return mHeaders.SetHeader(h, v, m); }

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 58 of file nsHttpRequestHead.h.

{ mMethod = method; }

Here is the caller graph for this function:

Definition at line 60 of file nsHttpRequestHead.h.

{ mRequestURI = s; }

Here is the caller graph for this function:

Definition at line 59 of file nsHttpRequestHead.h.

Here is the caller graph for this function:

Definition at line 64 of file nsHttpRequestHead.h.

{ return mVersion; }

Here is the caller graph for this function:


Member Data Documentation

Definition at line 76 of file nsHttpRequestHead.h.

Definition at line 77 of file nsHttpRequestHead.h.

Definition at line 79 of file nsHttpRequestHead.h.

Definition at line 78 of file nsHttpRequestHead.h.


The documentation for this class was generated from the following files: