Read a header from a buffer containing a complete HTTP response. This will return the location of the response header value in the HTTPResponse_t.pBuffer buffer.
The location, within HTTPResponse_t.pBuffer, of the value found, will be returned in pValue
. If the header value is empty for the found pField
, then this function will return HTTPSuccess, and set the values for pValueLoc
and pValueLen
as NULL and zero respectively. According to RFC 2616, it is not invalid to have an empty value for some header fields.
[in] | pResponse | The buffer containing the completed HTTP response. |
[in] | pField | The header field name to read. |
[in] | fieldLen | The length of the header field name in bytes. |
[out] | pValueLoc | This will be populated with the location of the header value in the response buffer, HTTPResponse_t.pBuffer. |
[out] | pValueLen | This will be populated with the length of the header value in bytes. |
Example