xrtHttpForwardedCursorInit
初始化单个 Forwarded 字段值游标。
void xrtHttpForwardedCursorInit( xhttpforwardedcursor* pCursor );
| 参数 | 说明 |
|---|---|
| xhttpforwardedcursor* pCursor | 游标 |
返回:初始化单个 Forwarded 字段值游标。
示例已编译验证
httpforwardedcursorinit obj; xrtHttpForwardedCursorInit(&obj, pCursor);
xrtHttpForwardedFieldCursorInit
初始化重复 Forwarded 字段行游标。
void xrtHttpForwardedFieldCursorInit( xhttpforwardedfieldcursor* pCursor );
| 参数 | 说明 |
|---|---|
| xhttpforwardedfieldcursor* pCursor | 游标 |
返回:初始化重复 Forwarded 字段行游标。
示例已编译验证
httpforwardedfieldcursorinit obj; xrtHttpForwardedFieldCursorInit(&obj, pCursor);
xrtHttpForwardedPairNext
严格读取下一项 name=value,忽略 RFC 允许的空分号项。
xhttpnext xrtHttpForwardedPairNext( xstrview Element, size_t* pOffset, xhttpparam* pPair );
| 参数 | 说明 |
|---|---|
| xstrview Element | 元素 |
| size_t* pOffset | 出:偏移 |
| xhttpparam* pPair | Par 参数 |
返回:严格读取下一项 name=value,忽略 RFC 允许的空分号项。
示例已编译验证
/* 严格读取下一项 name=value,忽略 RFC 允许的空分号项。 */ result = xrtHttpForwardedPairNext(Element, pOffset, pPair);
xrtHttpForwardedElementParse
严格解析一个代理元素;元素可为空,重复参数非法。
bool xrtHttpForwardedElementParse( xstrview Element, xhttpforwarded* pForwarded );
| 参数 | 说明 |
|---|---|
| xstrview Element | 元素 |
| xhttpforwarded* pForwarded | 转发对象 |
返回:严格解析一个代理元素;元素可为空,重复参数非法。
示例已编译验证
/* 严格解析一个代理元素;元素可为空,重复参数非法。 */ result = xrtHttpForwardedElementParse(Element, pForwarded);
xrtHttpForwardedValid
严格验证完整 Forwarded 字段值和所有标准参数语义。
bool xrtHttpForwardedValid(xstrview Value);
| 参数 | 说明 |
|---|---|
| xstrview Value | 值 |
返回:严格验证完整 Forwarded 字段值和所有标准参数语义。
示例已编译验证
/* 严格验证完整 Forwarded 字段值和所有标准参数语义。 */ result = xrtHttpForwardedValid(Value);
xrtHttpForwardedCount
完整验证并统计一个 Forwarded 字段值中的代理元素数量。
bool xrtHttpForwardedCount( xstrview Value, size_t* pCount );
| 参数 | 说明 |
|---|---|
| xstrview Value | 值 |
| size_t* pCount | 出:数量 |
返回:完整验证并统计一个 Forwarded 字段值中的代理元素数量。
示例已编译验证
/* 完整验证并统计一个 Forwarded 字段值中的代理元素数量。 */ result = xrtHttpForwardedCount(Value, pCount);
xrtHttpForwardedNext
按代理链路顺序迭代一个完整 Forwarded 字段值。
xhttpnext xrtHttpForwardedNext( xstrview Value, xhttpforwardedcursor* pCursor, xhttpforwarded* pForwarded );
| 参数 | 说明 |
|---|---|
| xstrview Value | 值 |
| xhttpforwardedcursor* pCursor | 游标 |
| xhttpforwarded* pForwarded | 转发对象 |
返回:按代理链路顺序迭代一个完整 Forwarded 字段值。
示例已编译验证
/* 按代理链路顺序迭代一个完整 Forwarded 字段值。 */ result = xrtHttpForwardedNext(Value, pCursor, pForwarded);
xrtHttpForwardedFieldCount
完整验证并统计全部同名字段行中的代理元素数量。
bool xrtHttpForwardedFieldCount( const xhttpfield* pFields, size_t iCount, size_t* pCount );
| 参数 | 说明 |
|---|---|
| const xhttpfield* pFields | 字段数组 |
| size_t iCount | 数量 |
| size_t* pCount | 出:数量 |
返回:完整验证并统计全部同名字段行中的代理元素数量。
示例已编译验证
/* 完整验证并统计全部同名字段行中的代理元素数量。 */ result = xrtHttpForwardedFieldCount(pFields, iCount, pCount);
xrtHttpForwardedFieldNext
跨重复 Forwarded 字段行按线路顺序迭代代理元素。
xhttpnext xrtHttpForwardedFieldNext( const xhttpfield* pFields, size_t iCount, xhttpforwardedfieldcursor* pCursor, xhttpforwarded* pForwarded );
| 参数 | 说明 |
|---|---|
| const xhttpfield* pFields | 字段数组 |
| size_t iCount | 数量 |
| xhttpforwardedfieldcursor* pCursor | 游标 |
| xhttpforwarded* pForwarded | 转发对象 |
返回:跨重复 Forwarded 字段行按线路顺序迭代代理元素。
示例已编译验证
/* 跨重复 Forwarded 字段行按线路顺序迭代代理元素。 */ result = xrtHttpForwardedFieldNext(pFields, iCount, pCursor, pForwarded);
xrtHttpForwardedNodeValid
验证已经解码的 by 或 for 节点标识。
bool xrtHttpForwardedNodeValid(xstrview Node);
| 参数 | 说明 |
|---|---|
| xstrview Node | Node 参数 |
返回:验证已经解码的 by 或 for 节点标识。
示例已编译验证
/* 验证已经解码的 by 或 for 节点标识。 */ result = xrtHttpForwardedNodeValid(Node);
xrtHttpForwardedHostValid
验证已解码的 Host ABNF;空主机和任意长度十进制端口合法。
bool xrtHttpForwardedHostValid(xstrview Host);
| 参数 | 说明 |
|---|---|
| xstrview Host | 主机名 |
返回:验证已解码的 Host ABNF;空主机和任意长度十进制端口合法。
示例已编译验证
/* 验证已解码的 Host ABNF;空主机和任意长度十进制端口合法。 */ result = xrtHttpForwardedHostValid(Host);
xrtHttpForwardedProtoValid
验证已经解码的 proto 参数值是 URI scheme。
bool xrtHttpForwardedProtoValid(xstrview Proto);
| 参数 | 说明 |
|---|---|
| xstrview Proto | Proto 参数 |
返回:验证已经解码的 proto 参数值是 URI scheme。
示例已编译验证
/* 验证已经解码的 proto 参数值是 URI scheme。 */ result = xrtHttpForwardedProtoValid(Proto);
xrtHttpForwardedElementWrite
规范写出一个 Forwarded 元素,不附加字段名称或 CRLF。
bool xrtHttpForwardedElementWrite( const xhttpforwardedvalue* pElement, void* pOutput, size_t iCapacity, size_t* pSize );
| 参数 | 说明 |
|---|---|
| const xhttpforwardedvalue* pElement | 元素 |
| void* pOutput | 出:输出缓冲 |
| size_t iCapacity | 容量 |
| size_t* pSize | 出:大小 |
返回:规范写出一个 Forwarded 元素,不附加字段名称或 CRLF。
示例已编译验证
/* 规范写出一个 Forwarded 元素,不附加字段名称或 CRLF。 */ result = xrtHttpForwardedElementWrite(pElement, pOutput, iCapacity, pSize);
xrtHttpForwardedWrite
原子写出逗号分隔的 Forwarded 元素数组。
bool xrtHttpForwardedWrite( const xhttpforwardedvalue* pElements, size_t iCount, void* pOutput, size_t iCapacity, size_t* pSize );
| 参数 | 说明 |
|---|---|
| const xhttpforwardedvalue* pElements | Elements 参数 |
| size_t iCount | 数量 |
| void* pOutput | 出:输出缓冲 |
| size_t iCapacity | 容量 |
| size_t* pSize | 出:大小 |
返回:原子写出逗号分隔的 Forwarded 元素数组。
示例已编译验证
/* 原子写出逗号分隔的 Forwarded 元素数组。 */ result = xrtHttpForwardedWrite(pElements, iCount, pOutput, iCapacity, pSize);
xrtHttpForwardedBuild
构建零结尾 Forwarded 字段值,返回值由 xrtFree 释放。
str xrtHttpForwardedBuild( const xhttpforwardedvalue* pElements, size_t iCount, size_t* pSize );
| 参数 | 说明 |
|---|---|
| const xhttpforwardedvalue* pElements | Elements 参数 |
| size_t iCount | 数量 |
| size_t* pSize | 出:大小 |
返回:构建零结尾 Forwarded 字段值,返回值由 xrtFree 释放。
示例已编译验证
/* 构建零结尾 Forwarded 字段值,返回值由 xrtFree 释放。 */ result = xrtHttpForwardedBuild(pElements, iCount, pSize);