4 * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Jungki Kwak <jungki.kwak@samsung.com>, Keunsoon Lee <keunsoon.lee@samsung.com>
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
20 * @file download-agent-http-misc.c
21 * @brief Including miscellaneous functions for http
22 * @author Keunsoon Lee(keunsoon.lee@samsung.com)
23 * @author Jungki Kwak(jungki.kwak@samsung.com)
26 #include "download-agent-http-misc.h"
27 #include "download-agent-debug.h"
28 #include "download-agent-dl-mgr.h"
29 #include "download-agent-plugin-conf.h"
30 #include "download-agent-client-mgr.h"
32 #define DEFAULT_HTTP_ACCEPT_HEADERS \
33 "Accept-Language: en\r\n" \
34 "Accept-Charset: utf-8\r\n" \
37 char* get_user_agent()
39 char *uagent_str = DA_NULL;
41 DA_LOG_FUNC_START(Default);
43 uagent_str = get_client_user_agent_string();
47 return GET_USER_AGENT;
51 da_bool_t is_supporting_protocol(const char* protocol)
53 if((protocol == NULL) || (1 > strlen(protocol)))
58 if(!strcasecmp(protocol, "http"))
62 else if(!strcasecmp(protocol, "https"))