char * calipso_request_get_header_value(calipso_request_t *request, char *header) { char *key, *val = NULL; calipso_pool_t *pool = calipso_request_get_pool(request); int keylen = cpo_strlen(header); if (pool && keylen) { key = cpo_pool_strndup_lower(pool, header, keylen); val = hash_table_get_data(request->header, key); cpo_pool_free(pool, key); } return val; }
char * calipso_reply_get_header_value(calipso_reply_t *reply, char *header) { char *key, *val = NULL; size_t keylen; calipso_pool_t *pool; pool = reply->request->pool; //calipso_reply_get_pool(reply); keylen = strlen(header); if(pool && keylen) { key = cpo_pool_strndup_lower(pool, header, keylen); val = hash_table_get_data( reply->header, key); } return val; }