mirror of https://github.com/Icinga/icinga2.git
parent
cdda3bad8c
commit
22bb1f406a
|
@ -26,8 +26,8 @@
|
||||||
#define UNRESERVED ALPHA NUMERIC "-._~" "%"
|
#define UNRESERVED ALPHA NUMERIC "-._~" "%"
|
||||||
#define GEN_DELIMS ":/?#[]@"
|
#define GEN_DELIMS ":/?#[]@"
|
||||||
#define SUB_DELIMS "!$&'()*+,;="
|
#define SUB_DELIMS "!$&'()*+,;="
|
||||||
#define RESERVED GEN_DELIMS SUB-DELIMS
|
|
||||||
#define PCHAR UNRESERVED SUB_DELIMS ":@"
|
#define PCHAR UNRESERVED SUB_DELIMS ":@"
|
||||||
|
#define PCHAR_ENCODE UNRESERVED ":@"
|
||||||
|
|
||||||
#define ACSCHEME ALPHA NUMERIC ".-+"
|
#define ACSCHEME ALPHA NUMERIC ".-+"
|
||||||
|
|
||||||
|
@ -37,7 +37,10 @@
|
||||||
#define ACPORT NUMERIC
|
#define ACPORT NUMERIC
|
||||||
|
|
||||||
#define ACPATHSEGMENT PCHAR
|
#define ACPATHSEGMENT PCHAR
|
||||||
|
#define ACPATHSEGMENT_ENCODE PCHAR_ENCODE
|
||||||
#define ACQUERY PCHAR "/?"
|
#define ACQUERY PCHAR "/?"
|
||||||
|
#define ACQUERY_ENCODE PCHAR_ENCODE "/?"
|
||||||
#define ACFRAGMENT PCHAR "/?"
|
#define ACFRAGMENT PCHAR "/?"
|
||||||
|
#define ACFRAGMENT_ENCODE PCHAR_ENCODE "/?"
|
||||||
|
|
||||||
#endif /* URL_CHARACTERS_H */
|
#endif /* URL_CHARACTERS_H */
|
||||||
|
|
|
@ -243,7 +243,7 @@ String Url::Format(bool print_credentials) const
|
||||||
else {
|
else {
|
||||||
BOOST_FOREACH (const String& segment, m_Path) {
|
BOOST_FOREACH (const String& segment, m_Path) {
|
||||||
url += "/";
|
url += "/";
|
||||||
url += Utility::EscapeString(segment, ACPATHSEGMENT, false);
|
url += Utility::EscapeString(segment, ACPATHSEGMENT_ENCODE, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -252,7 +252,7 @@ String Url::Format(bool print_credentials) const
|
||||||
typedef std::pair<String, std::vector<String> > kv_pair;
|
typedef std::pair<String, std::vector<String> > kv_pair;
|
||||||
|
|
||||||
BOOST_FOREACH (const kv_pair& kv, m_Query) {
|
BOOST_FOREACH (const kv_pair& kv, m_Query) {
|
||||||
String key = Utility::EscapeString(kv.first, ACQUERY, false);
|
String key = Utility::EscapeString(kv.first, ACQUERY_ENCODE, false);
|
||||||
if (param.IsEmpty())
|
if (param.IsEmpty())
|
||||||
param = "?";
|
param = "?";
|
||||||
else
|
else
|
||||||
|
@ -268,7 +268,7 @@ String Url::Format(bool print_credentials) const
|
||||||
if (kv.second.size() > 1)
|
if (kv.second.size() > 1)
|
||||||
temp += "[]";
|
temp += "[]";
|
||||||
|
|
||||||
temp += "=" + Utility::EscapeString(s, ACQUERY, false);
|
temp += "=" + Utility::EscapeString(s, ACQUERY_ENCODE, false);
|
||||||
}
|
}
|
||||||
param += temp;
|
param += temp;
|
||||||
}
|
}
|
||||||
|
@ -277,7 +277,7 @@ String Url::Format(bool print_credentials) const
|
||||||
url += param;
|
url += param;
|
||||||
|
|
||||||
if (!m_Fragment.IsEmpty())
|
if (!m_Fragment.IsEmpty())
|
||||||
url += "#" + Utility::EscapeString(m_Fragment, ACFRAGMENT, false);
|
url += "#" + Utility::EscapeString(m_Fragment, ACFRAGMENT_ENCODE, false);
|
||||||
|
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue