HTTP-XSHeaders
view release on metacpan or search on metacpan
HNode* hn = &h->data[j];
const char* header = hn->header->name;
int lh = strlen(header);
PList* pl = hn->values;
int k;
for (k = 0; k < pl->ulen; ++k) {
PNode* pn = &pl->data[k];
const char* value = SvPV_nolen( (SV*) pn->ptr );
int lv = strlen(value);
/* string_cleanup always emits a trailing newl ("le" bytes) for
* values that don't already end in "\n"; the original formula
* did not account for that, producing a heap-buffer-overflow
* when many empty (lv == 0) values were serialised. The +le
* term below closes that gap. */
*size += lh + 2 + lv + lv * le + le;
}
}
{
char* rstr;
int rpos = 0;
( run in 0.453 second using v1.01-cache-2.11-cpan-d7a12ab2c7f )