release: version 1.0.10 - Fix JSON serialization and remove unused fields

- FIX: Correct JSON string length parameters for query field (8→9)
- FIX: Add null-termination after buffer reallocation in dynbuf_append
- CHANGE: Remove unparsed_uri, fragment, and content_length fields
- TEST: Update unit tests to match dynbuf_append fix

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
Jacquin Antoine
2026-03-02 23:41:38 +01:00
parent e606e7760f
commit 62b174c1a2
4 changed files with 12 additions and 52 deletions

View File

@ -43,7 +43,8 @@ static void testbuf_append(testbuf_t *buf, const char *str, size_t len)
if (buf->len + len + 1 > buf->cap) {
size_t new_cap = (buf->len + len + 1) * 2;
char *new_data = apr_palloc(buf->pool, new_cap);
memcpy(new_data, buf->data, buf->len + 1);
memcpy(new_data, buf->data, buf->len);
new_data[buf->len] = '\0';
buf->data = new_data;
buf->cap = new_cap;
}

View File

@ -85,6 +85,7 @@ static void dynbuf_append(dynbuf_t *db, const char *str, apr_size_t len)
apr_size_t new_capacity = (db->len + len + 1) * 2;
char *new_data = apr_palloc(db->pool, new_capacity);
memcpy(new_data, db->data, db->len);
new_data[db->len] = '\0';
db->data = new_data;
db->capacity = new_capacity;
}