MCPcopy Index your code
hub / github.com/apache/httpd / store_table

Function store_table

modules/cache/mod_cache_disk.c:912–942  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

910}
911
912static apr_status_t store_table(apr_file_t *fd, apr_table_t *table)
913{
914 int i;
915 apr_status_t rv;
916 struct iovec iov[4];
917 apr_size_t amt;
918 apr_table_entry_t *elts;
919
920 elts = (apr_table_entry_t *) apr_table_elts(table)->elts;
921 for (i = 0; i < apr_table_elts(table)->nelts; ++i) {
922 if (elts[i].key != NULL) {
923 iov[0].iov_base = elts[i].key;
924 iov[0].iov_len = strlen(elts[i].key);
925 iov[1].iov_base = ": ";
926 iov[1].iov_len = sizeof(": ") - 1;
927 iov[2].iov_base = elts[i].val;
928 iov[2].iov_len = strlen(elts[i].val);
929 iov[3].iov_base = CRLF;
930 iov[3].iov_len = sizeof(CRLF) - 1;
931
932 rv = apr_file_writev_full(fd, (const struct iovec *) &iov, 4, &amt);
933 if (rv != APR_SUCCESS) {
934 return rv;
935 }
936 }
937 }
938 iov[0].iov_base = CRLF;
939 iov[0].iov_len = sizeof(CRLF) - 1;
940 rv = apr_file_writev_full(fd, (const struct iovec *) &iov, 1, &amt);
941 return rv;
942}
943
944static apr_status_t store_headers(cache_handle_t *h, request_rec *r, cache_info *info)
945{

Callers 1

write_headersFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected