p = params = NULL;
len = 0;
- for (blk = htx_get_head_blk(htx); blk; blk = htx_get_next_blk(htx, blk)) {
+ for (blk = htx_get_first_blk(htx); blk; blk = htx_get_next_blk(htx, blk)) {
enum htx_blk_type type = htx_get_blk_type(blk);
struct ist v;
}
chunk_reset(&trash);
- for (pos = htx_get_head(htx); pos != -1; pos = htx_get_next(htx, pos)) {
+ for (pos = htx_get_first(htx); pos != -1; pos = htx_get_next(htx, pos)) {
struct htx_blk *blk = htx_get_blk(htx, pos);
enum htx_blk_type type = htx_get_blk_type(blk);
uint32_t sz = htx_get_blksz(blk);
}
i = 0;
- for (blk = htx_get_head_blk(htx); nbh < DA_MAX_HEADERS && blk; blk = htx_get_next_blk(htx, blk)) {
+ for (blk = htx_get_first_blk(htx); nbh < DA_MAX_HEADERS && blk; blk = htx_get_next_blk(htx, blk)) {
size_t vlen;
char *pval;
da_evidence_id_t evid;
struct htx *htx = htxbuf(&chn->buf);
int32_t pos;
- for (pos = htx_get_head(htx); pos != -1; pos = htx_get_next(htx, pos)) {
+ for (pos = htx_get_first(htx); pos != -1; pos = htx_get_next(htx, pos)) {
struct htx_blk *blk = htx_get_blk(htx, pos);
c_adv(chn, htx_get_blksz(blk));
if (htx_get_blk_type(blk) == HTX_BLK_EOH)
HTX_SL_P2_LEN(sl), HTX_SL_P2_PTR(sl),
HTX_SL_P3_LEN(sl), HTX_SL_P3_PTR(sl));
- for (pos = htx_get_head(htx); pos != -1; pos = htx_get_next(htx, pos)) {
+ for (pos = htx_get_first(htx); pos != -1; pos = htx_get_next(htx, pos)) {
struct htx_blk *blk = htx_get_blk(htx, pos);
enum htx_blk_type type = htx_get_blk_type(blk);
struct ist n, v;
lua_settable(L, -3);
}
- for (pos = htx_get_head(htx); pos != -1; pos = htx_get_next(htx, pos)) {
+ for (pos = htx_get_first(htx); pos != -1; pos = htx_get_next(htx, pos)) {
struct htx_blk *blk = htx_get_blk(htx, pos);
enum htx_blk_type type = htx_get_blk_type(blk);
htx = htx_from_buf(&req->buf);
count = co_data(req);
- blk = htx_get_head_blk(htx);
+ blk = htx_get_first_blk(htx);
while (count && !stop && blk) {
enum htx_blk_type type = htx_get_blk_type(blk);
htx = htx_from_buf(&req->buf);
len = MAY_LJMP(luaL_checkinteger(L, 2));
count = co_data(req);
- blk = htx_get_head_blk(htx);
+ blk = htx_get_first_blk(htx);
while (count && len && blk) {
enum htx_blk_type type = htx_get_blk_type(blk);
uint32_t sz = htx_get_blksz(blk);
struct htx *htx = htxbuf(&msg->chn->buf);
int32_t pos;
- for (pos = htx_get_head(htx); pos != -1; pos = htx_get_next(htx, pos)) {
+ for (pos = htx_get_first(htx); pos != -1; pos = htx_get_next(htx, pos)) {
struct htx_blk *blk = htx_get_blk(htx, pos);
enum htx_blk_type type = htx_get_blk_type(blk);
struct ist n, v;
* the Lua.
*/
req_htx = htx_from_buf(&req->buf);
- blk = htx_get_head_blk(req_htx);
+ blk = htx_get_first_blk(req_htx);
while (count && blk) {
enum htx_blk_type type = htx_get_blk_type(blk);
uint32_t sz = htx_get_blksz(blk);
if (!htx)
return 0;
temp = get_trash_chunk();
- for (pos = htx_get_head(htx); pos != -1; pos = htx_get_next(htx, pos)) {
+ for (pos = htx_get_first(htx); pos != -1; pos = htx_get_next(htx, pos)) {
struct htx_blk *blk = htx_get_blk(htx, pos);
enum htx_blk_type type = htx_get_blk_type(blk);
temp = get_trash_chunk();
p = temp->area;
end = temp->area + temp->size;
- for (pos = htx_get_head(htx); pos != -1; pos = htx_get_next(htx, pos)) {
+ for (pos = htx_get_first(htx); pos != -1; pos = htx_get_next(htx, pos)) {
struct htx_blk *blk = htx_get_blk(htx, pos);
enum htx_blk_type type = htx_get_blk_type(blk);
struct ist n, v;
return 0;
temp = get_trash_chunk();
- for (pos = htx_get_head(htx); pos != -1; pos = htx_get_next(htx, pos)) {
+ for (pos = htx_get_first(htx); pos != -1; pos = htx_get_next(htx, pos)) {
struct htx_blk *blk = htx_get_blk(htx, pos);
enum htx_blk_type type = htx_get_blk_type(blk);
if (!htx)
return 0;
- for (pos = htx_get_head(htx); pos != -1; pos = htx_get_next(htx, pos)) {
+ for (pos = htx_get_first(htx); pos != -1; pos = htx_get_next(htx, pos)) {
struct htx_blk *blk = htx_get_blk(htx, pos);
enum htx_blk_type type = htx_get_blk_type(blk);
if (!htx)
return 0;
- for (pos = htx_get_head(htx); pos != -1; pos = htx_get_next(htx, pos)) {
+ for (pos = htx_get_first(htx); pos != -1; pos = htx_get_next(htx, pos)) {
struct htx_blk *blk = htx_get_blk(htx, pos);
enum htx_blk_type type = htx_get_blk_type(blk);
del = *args[0].data.str.area;
temp = get_trash_chunk();
- for (pos = htx_get_head(htx); pos != -1; pos = htx_get_next(htx, pos)) {
+ for (pos = htx_get_first(htx); pos != -1; pos = htx_get_next(htx, pos)) {
struct htx_blk *blk = htx_get_blk(htx, pos);
enum htx_blk_type type = htx_get_blk_type(blk);
struct ist n;
return 0;
temp = get_trash_chunk();
- for (pos = htx_get_head(htx); pos != -1; pos = htx_get_next(htx, pos)) {
+ for (pos = htx_get_first(htx); pos != -1; pos = htx_get_next(htx, pos)) {
struct htx_blk *blk = htx_get_blk(htx, pos);
enum htx_blk_type type = htx_get_blk_type(blk);
if (!htx->used)
return 0;
- for (blk = htx_get_head_blk(htx); blk; blk = htx_get_next_blk(htx, blk)) {
+ for (blk = htx_get_first_blk(htx); blk; blk = htx_get_next_blk(htx, blk)) {
rescan_hdr:
type = htx_get_blk_type(blk);
if (type == HTX_BLK_EOH || type == HTX_BLK_EOM)
/* <blk> is the head, swap it iteratively with its predecessor to place
* it just before the end-of-header block. So blocks remains ordered. */
- for (prev = htx_get_prev(htx, htx->tail); prev != -1; prev = htx_get_prev(htx, prev)) {
+ for (prev = htx_get_prev(htx, htx->tail); prev != htx->sl_pos; prev = htx_get_prev(htx, prev)) {
struct htx_blk *pblk = htx_get_blk(htx, prev);
enum htx_blk_type type = htx_get_blk_type(pblk);
htx_debug_stline("clireq", s, sl);
- for (pos = htx_get_head(htx); pos != -1; pos = htx_get_next(htx, pos)) {
+ for (pos = htx_get_first(htx); pos != -1; pos = htx_get_next(htx, pos)) {
struct htx_blk *blk = htx_get_blk(htx, pos);
enum htx_blk_type type = htx_get_blk_type(blk);
htx_debug_stline("srvrep", s, sl);
- for (pos = htx_get_head(htx); pos != -1; pos = htx_get_next(htx, pos)) {
+ for (pos = htx_get_first(htx); pos != -1; pos = htx_get_next(htx, pos)) {
struct htx_blk *blk = htx_get_blk(htx, pos);
enum htx_blk_type type = htx_get_blk_type(blk);
htx = htxbuf(&req->buf);
- for (pos = htx_get_head(htx); pos != -1; pos = htx_get_next(htx, pos)) {
+ for (pos = htx_get_first(htx); pos != -1; pos = htx_get_next(htx, pos)) {
struct htx_blk *blk = htx_get_blk(htx, pos);
enum htx_blk_type type;
struct ist n, v;
htx = htxbuf(&res->buf);
- for (pos = htx_get_head(htx); pos != -1; pos = htx_get_next(htx, pos)) {
+ for (pos = htx_get_first(htx); pos != -1; pos = htx_get_next(htx, pos)) {
struct htx_blk *blk = htx_get_blk(htx, pos);
enum htx_blk_type type;
struct ist n, v;
htx = htxbuf(&req->buf);
pragma_found = cc_found = 0;
- for (pos = htx_get_head(htx); pos != -1; pos = htx_get_next(htx, pos)) {
+ for (pos = htx_get_first(htx); pos != -1; pos = htx_get_next(htx, pos)) {
struct htx_blk *blk = htx_get_blk(htx, pos);
enum htx_blk_type type = htx_get_blk_type(blk);
struct ist n, v;
}
htx = htxbuf(&res->buf);
- for (pos = htx_get_head(htx); pos != -1; pos = htx_get_next(htx, pos)) {
+ for (pos = htx_get_first(htx); pos != -1; pos = htx_get_next(htx, pos)) {
struct htx_blk *blk = htx_get_blk(htx, pos);
enum htx_blk_type type = htx_get_blk_type(blk);
struct ist n, v;
struct cap_hdr *h;
int32_t pos;
- for (pos = htx_get_head(htx); pos != -1; pos = htx_get_next(htx, pos)) {
+ for (pos = htx_get_first(htx); pos != -1; pos = htx_get_next(htx, pos)) {
struct htx_blk *blk = htx_get_blk(htx, pos);
enum htx_blk_type type = htx_get_blk_type(blk);
struct ist n, v;
}
/* The request was fully received. Copy data */
- blk = htx_get_head_blk(htx);
+ blk = htx_get_first_blk(htx);
while (blk) {
enum htx_blk_type type = htx_get_blk_type(blk);