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

Function http_util_set_req_cookie

lib_protocol/src/http/http_util.c:143–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141}
142
143void http_util_set_req_cookie(HTTP_UTIL *http_util, const char *name, const char *value)
144{
145 HTTP_HDR_ENTRY *hdr_entry;
146 char *ptr;
147
148 if (name == NULL || *name == 0 || value == NULL)
149 return;
150 hdr_entry = http_hdr_entry(&http_util->hdr_req->hdr, name);
151 if (hdr_entry == NULL) {
152 http_hdr_put_str(&http_util->hdr_req->hdr, name, value);
153 return;
154 }
155
156 ptr = acl_concatenate(hdr_entry->value, "; ", name, "=", value, NULL);
157 acl_myfree(hdr_entry->value);
158 hdr_entry->value = ptr;
159}
160
161void http_util_set_req_proxy(HTTP_UTIL *http_util, const char *proxy)
162{

Callers

nothing calls this directly

Calls 3

http_hdr_entryFunction · 0.85
http_hdr_put_strFunction · 0.85
acl_concatenateFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…