Enhancements

Fix incorrect order of tolerance and timeout field in custom group config.
Fix Content-Disposition header for better support on browsers.
Fix parsing of some Shadowrocket links.
Support HEAD request that only return Subscription-UserInfo (#434).
Add more detail info to crash report.
This commit is contained in:
Tindy X committed 2022-03-20 17:34:01 +08:00
1 parent ebe68f64b1
commit 406b0f2022
6 files changed
+56 -15

No files matched your search

+25
View File
@@ -42,3 +42,28 @@ void writeLog(int type, const std::string &content, int level)
std::cerr<<getTime(2)<<" ["<<getpid()<<" "<<std::this_thread::get_id()<<"]"<<levels[level % 6];
std::cerr<<" "<<content<<"\n";
}
#ifdef __GNUG__
#include <cstdlib>
#include <memory>
#include <cxxabi.h>
std::string demangle(const char* name)
{
int status = -4;
std::unique_ptr<char, void(*)(void*)> res {
abi::__cxa_demangle(name, NULL, NULL, &status),
std::free
};
return (status == 0) ? res.get() : name;
}
#else
std::string demangle(const char* name)
{
return name;
}
#endif