MCPcopy Create free account
hub / github.com/acl-dev/acl / hdr_ready

Function hdr_ready

lib_protocol/src/http/http_chat_sync.c:56–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54/* ����һ������, �Ƿ���һ��������HTTPЭ��ͷ */
55
56static int hdr_ready(HTTP_HDR *hdr, const char *line, int dlen)
57{
58 HTTP_HDR_ENTRY *entry;
59
60 hdr->cur_lines++;
61 if (hdr->max_lines > 0 && hdr->cur_lines > hdr->max_lines) {
62 return HTTP_CHAT_ERR_TOO_MANY_LINES;
63 }
64
65 if (dlen > 0) {
66 hdr->valid_lines++;
67 }
68
69 if (dlen == 0) {
70 if (hdr->valid_lines > 0) {
71 return HTTP_CHAT_OK;
72 } else {
73 return HTTP_CHAT_CONTINUE;
74 }
75 }
76
77 entry = http_hdr_entry_new(line);
78 if (entry == NULL) { /* ignore invalid entry line */
79 return HTTP_CHAT_CONTINUE;
80 }
81
82 http_hdr_append_entry(hdr, entry);
83 return HTTP_CHAT_CONTINUE;
84}
85
86/* ͬ����ȡһ��������HTTPЭ��ͷ */
87

Callers 1

hdr_getFunction · 0.70

Calls 2

http_hdr_entry_newFunction · 0.85
http_hdr_append_entryFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…