aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/SimpleHandlers.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/SimpleHandlers.cpp b/src/SimpleHandlers.cpp
index 70b3a8c..323db44 100644
--- a/src/SimpleHandlers.cpp
+++ b/src/SimpleHandlers.cpp
@@ -214,12 +214,17 @@ json Handler::latexRenderHandler(std::string const &arguments, std::string const
std::string file = exec("mktemp");
+ std::cout << ("file " + file) << ": " << exec(("file " + file).c_str()) << std::endl;
+ std::cout << ("ls -lisa " + file) << ": " << exec(("ls -lisa " + file).c_str()) << std::endl;
+
std::string result = exec(("curl -s 'https://latex.codecogs.com/png.latex?" + url_encode(arguments) + "' "
"-H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Firefox/78.0' "
"-H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' "
"-H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'DNT: 1' -H 'Connection: keep-alive' "
"-H 'Upgrade-Insecure-Requests: 1' --output " + file).c_str());
+ std::cout << ("ls -lisa " + file) << ": " << exec(("ls -lisa " + file).c_str()) << std::endl;
+
if (!result.empty())
return simple_response("Error: " + result + "\n"
"Please report to an admin", session, false);