summaryrefslogtreecommitdiff
path: root/src/http_decoder_table.c
diff options
context:
space:
mode:
author李佳 <[email protected]>2024-04-12 11:41:14 +0000
committer李佳 <[email protected]>2024-04-12 11:41:14 +0000
commitf40db506ee7570e836ac97b7806a679bc36da155 (patch)
treee4483ca1d2a28079c57ab6f0ac055dfe08c47915 /src/http_decoder_table.c
parent55ac6e270ae37299e2bce3a47a3d784e29dcae14 (diff)
parent094d0f8e45931b195e358989d2843a298e9fd567 (diff)
Merge branch 'api-unit-test' into 'develop'
Add unit tests. See merge request stellar/http_decoder!5
Diffstat (limited to 'src/http_decoder_table.c')
-rw-r--r--src/http_decoder_table.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/http_decoder_table.c b/src/http_decoder_table.c
index e999bd7..cc3e7cb 100644
--- a/src/http_decoder_table.c
+++ b/src/http_decoder_table.c
@@ -487,7 +487,7 @@ int http_decoder_table_iter_header(struct http_decoder_table *table,
}
if (table->header_iter >= table->header_cnt) {
- return 0;
+ return -1;
}
struct http_decoder_header *tmp_header = &table->headers[table->header_iter];
@@ -498,8 +498,7 @@ int http_decoder_table_iter_header(struct http_decoder_table *table,
http_decoder_string_get(&tmp_header->key, &hdr->key);
http_decoder_string_get(&tmp_header->val, &hdr->val);
table->header_iter++;
-
- return 1;
+ return 0;
}
}
@@ -509,7 +508,7 @@ int http_decoder_table_iter_header(struct http_decoder_table *table,
hdr->val.str = NULL;
hdr->val.str_len = 0;
- return 0;
+ return -1;
}
int http_decoder_table_reset_header_iter(struct http_decoder_table *table)