struct htx_sl *sl;
struct ist meth, uri, vsn;
unsigned int flags;
- size_t used;
/* <h1sl> is always defined for a request */
meth = h1sl->rq.m;
h1m->curr_len = h1m->body_len = 0;
}
- used = htx_used_space(htx);
flags = h1m_htx_sl_flags(h1m);
sl = htx_add_stline(htx, HTX_BLK_REQ_SL, flags, meth, uri, vsn);
if (!sl || !htx_add_all_headers(htx, hdrs))
if (uri.len > 4 && (uri.ptr[0] | 0x20) == 'h')
sl->flags |= ((uri.ptr[4] == ':') ? HTX_SL_F_SCHM_HTTP : HTX_SL_F_SCHM_HTTPS);
}
- /* Set bytes used in the HTX message for the headers now */
- sl->hdrs_bytes = htx_used_space(htx) - used;
/* If body length cannot be determined, set htx->extra to
* ULLONG_MAX. This value is impossible in other cases.
struct htx_sl *sl;
struct ist vsn, status, reason;
unsigned int flags;
- size_t used;
uint16_t code = 0;
if (h1sl) {
h1m->flags |= H1_MF_XFER_LEN;
}
- used = htx_used_space(htx);
flags = h1m_htx_sl_flags(h1m);
sl = htx_add_stline(htx, HTX_BLK_RES_SL, flags, vsn, status, reason);
if (!sl || !htx_add_all_headers(htx, hdrs))
goto error;
sl->info.res.status = code;
- /* Set bytes used in the HTX message for the headers now */
- sl->hdrs_bytes = htx_used_space(htx) - used;
-
/* If body length cannot be determined, set htx->extra to
* ULLONG_MAX. This value is impossible in other cases.
*/
int phdr;
int ret;
int i;
- uint32_t used = htx_used_space(htx);
struct htx_sl *sl = NULL;
unsigned int sl_flags = 0;
const char *ctl;
if (!htx_add_endof(htx, HTX_BLK_EOH))
goto fail;
- /* Set bytes used in the HTX message for the headers now */
- sl->hdrs_bytes = htx_used_space(htx) - used;
-
ret = 1;
return ret;
int phdr;
int ret;
int i;
- uint32_t used = htx_used_space(htx);
struct htx_sl *sl = NULL;
unsigned int sl_flags = 0;
const char *ctl;
if (!htx_add_endof(htx, HTX_BLK_EOH))
goto fail;
- /* Set bytes used in the HTX message for the headers now */
- sl->hdrs_bytes = htx_used_space(htx) - used;
-
ret = 1;
return ret;
sl = htx_get_blk_ptr(htx, blk);
tmp.info = sl->info;
tmp.flags = sl->flags;
- tmp.hdrs_bytes = sl->hdrs_bytes;
sz = htx_get_blksz(blk);
delta = sizeof(*sl) + p1.len + p2.len + p3.len - sz;
sl = htx_get_blk_ptr(htx, blk);
sl->info = tmp.info;
sl->flags = tmp.flags;
- sl->hdrs_bytes = tmp.hdrs_bytes;
HTX_SL_P1_LEN(sl) = p1.len;
HTX_SL_P2_LEN(sl) = p2.len;