2 * Copyright (c) 2012 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #include "download-agent-http-misc.h"
18 #include "download-agent-debug.h"
19 #include "download-agent-dl-mgr.h"
20 #include "download-agent-plugin-conf.h"
21 #include "download-agent-client-mgr.h"
23 #define DEFAULT_HTTP_ACCEPT_HEADERS \
24 "Accept-Language: en\r\n" \
25 "Accept-Charset: utf-8\r\n" \
28 char *get_user_agent()
30 char *uagent_str = DA_NULL;
32 DA_LOG_FUNC_START(Default);
34 uagent_str = get_client_user_agent_string();
36 da_result_t ret = DA_RESULT_OK;
37 ret = get_user_agent_string(&uagent_str);
38 if (ret != DA_RESULT_OK)
44 da_bool_t is_supporting_protocol(const char *protocol)
46 if((protocol == NULL) || (1 > strlen(protocol)))
51 if(!strcasecmp(protocol, "http"))
55 else if(!strcasecmp(protocol, "https"))