Logo Search packages:      
Sourcecode: qt4-x11 version File versions  Download package

bool QHttpHeader::parseLine ( const QString line,
int  number 
) [protected, virtual]

For internal use only.

Parses the single HTTP header line line which has the format key, colon, space, value, and adds key/value to the headers. The linenumber is number. Returns true if the line was successfully parsed and the key/value added; otherwise returns false.

See also:

Reimplemented in QHttpResponseHeader, and QHttpRequestHeader.

Definition at line 836 of file qhttp.cpp.

References addValue(), QString::indexOf(), QString::left(), QString::mid(), QString::toLower(), and QString::trimmed().

Referenced by parse(), QHttpResponseHeader::parseLine(), and QHttpRequestHeader::parseLine().

    int i = line.indexOf(':');
    if (i == -1)
        return false;

    addValue(line.left(i).trimmed().toLower(), line.mid(i + 1).trimmed());

    return true;

Generated by  Doxygen 1.6.0   Back to index