MCPcopy Create free account
hub / github.com/ClassiCube/ClassiCube / HttpBackend_Add

Function HttpBackend_Add

src/webclient/Http_Web.c:149–159  ·  view source on GitHub ↗

Adds a req to the list of pending requests, waking up worker thread if needed

Source from the content-addressed store, hash-verified

147
148// Adds a req to the list of pending requests, waking up worker thread if needed
149static void HttpBackend_Add(struct HttpRequest* req, cc_uint8 flags) {
150 // Add time based query string parameter to bypass browser cache
151 if (flags & HTTP_FLAG_NOCACHE) {
152 cc_string url = String_FromRawArray(req->url);
153 int lo = (int)(startTime), hi = (int)(startTime >> 32);
154 String_Format2(&url, "?t=%i%i", &hi, &lo);
155 }
156
157 RequestList_Append(&queuedReqs, req, flags);
158 Http_StartNextDownload();
159}
160
161
162/*########################################################################################################################*

Callers

nothing calls this directly

Calls 3

String_Format2Function · 0.85
RequestList_AppendFunction · 0.85
Http_StartNextDownloadFunction · 0.85

Tested by

no test coverage detected