MCPcopy Create free account
hub / github.com/dillo-browser/dillo / send_decoded_data

Function send_decoded_data

dpi/datauri.c:164–181  ·  view source on GitHub ↗

* Send decoded data to dillo in an HTTP envelope. */

Source from the content-addressed store, hash-verified

162 * Send decoded data to dillo in an HTTP envelope.
163 */
164static void send_decoded_data(const char *url, const char *mime_type,
165 unsigned char *data, size_t data_sz)
166{
167 char *d_cmd;
168
169 /* Send dpip tag */
170 d_cmd = a_Dpip_build_cmd("cmd=%s url=%s", "start_send_page", url);
171 a_Dpip_dsh_write_str(sh, 1, d_cmd);
172 dFree(d_cmd);
173
174 /* Send HTTP header. */
175 a_Dpip_dsh_write_str(sh, 0, "Content-type: ");
176 a_Dpip_dsh_write_str(sh, 0, mime_type);
177 a_Dpip_dsh_write_str(sh, 1, "\n\n");
178
179 /* Send message */
180 a_Dpip_dsh_write(sh, 0, (char *)data, data_sz);
181}
182
183static void send_failure_message(const char *url, const char *mime_type,
184 unsigned char *data, size_t data_sz)

Callers 1

mainFunction · 0.85

Calls 4

a_Dpip_build_cmdFunction · 0.85
a_Dpip_dsh_write_strFunction · 0.85
dFreeFunction · 0.85
a_Dpip_dsh_writeFunction · 0.85

Tested by

no test coverage detected