switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR,"Response page is more than %d bytes long, truncating.\n",HTTP_SENDFILE_RESPONSE_SIZE);
realsize=0;
}
returnrealsize;
}
// This function and do_lookup_url functions could possibly be merged together. Or at least have do_lookup_url call this up as part of the initialization routine as it is a subset of the operations.
switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_INFO,"Sending of file %s to url %s resulted with code %lu\n",http_data->filename_element,http_data->url,http_data->http_response_code);
switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_INFO,"Invalid parameter %s specified for curl_sendfile_report. Setting default of 'none'.\n",send_output);
}
}
else
{
switch_set_flag(http_data,CSO_NONE);
switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_INFO,"No parameter specified for curl_sendfile_report. Setting default of 'none'.\n");
switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_ERROR,"Failure: Usage: <data=\"%s\">\nOr you can set chanvars curl_senfile_url, curl_sendfile_filename_element, curl_sendfile_filename, curl_sendfile_extrapost\n",HTTP_SENDFILE_APP_SYNTAX);
switch_log_printf(SWITCH_CHANNEL_LOG,SWITCH_LOG_DEBUG,"We're using a session's memory pool for curl_sendfile. Maybe we should consider always making a new memory pool?\n");
}
else
{
switch_core_new_memory_pool(&pool);
new_memory_pool=SWITCH_TRUE;// So we can properly destroy the memory pool
SWITCH_ADD_APP(app_interface,"curl_sendfile","Send a file and some optional post variables via HTTP","Send a file and some optional post variables via HTTP",