bes Updated for version 3.21.1
The Backend Server (BES) is the lower two tiers of the Hyrax data server
HttpUtils.h
1// -*- mode: c++; c-basic-offset:4 -*-
2
3// This file is part of the BES http package, part of the Hyrax data server.
4
5// Copyright (c) 2020 OPeNDAP, Inc.
6// Author: Nathan Potter <ndp@opendap.org>
7//
8// This library is free software; you can redistribute it and/or
9// modify it under the terms of the GNU Lesser General Public
10// License as published by the Free Software Foundation; either
11// version 2.1 of the License, or (at your option) any later version.
12//
13// This library is distributed in the hope that it will be useful,
14// but WITHOUT ANY WARRANTY; without even the implied warranty of
15// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16// Lesser General Public License for more details.
17//
18// You should have received a copy of the GNU Lesser General Public
19// License along with this library; if not, write to the Free Software
20// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21//
22// You can contact OPeNDAP, Inc. at PO Box 112, Saunderstown, RI. 02874-0112.
23
24// Authors:
25// ndp Nathan Potter <ndp@opendap.org>
39#ifndef _bes_http_HTTP_UTILS_H_
40#define _bes_http_HTTP_UTILS_H_ 1
41
42#include <string>
43#include <map>
44#include <vector>
45
46namespace http {
47
48 void load_mime_list_from_keys(std::map<std::string, std::string> &mime_list);
49 void load_proxy_from_keys();
51
52 void get_type_from_disposition(const std::string &disp, std::string &type);
53 void get_type_from_content_type(const std::string &ctype, std::string &type);
54 void get_type_from_url(const std::string &url, std::string &type);
55
56 std::string url_encode(const std::string &s);
57
58} // namespace http
59
60#endif // _bes_http_HTTP_UTILS_H_
61
Parse a URL into the protocol, host, path and query parts.
Definition url_impl.h:44
utility class for the HTTP catalog module
Definition TheBESKeys.h:51
size_t load_max_redirects_from_keys()
Definition HttpUtils.cc:178
void get_type_from_disposition(const string &disp, string &type)
Definition HttpUtils.cc:110
string url_encode(const string &s)
Definition HttpUtils.cc:215
void load_mime_list_from_keys(map< string, string > &mime_list)
Definition HttpUtils.cc:72