Loading examples/httpauth.cpp +6 −2 Changes for examples/httpauth.cpp: 6 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -67,7 +67,9 @@ public: << "<li><a href=\"/httpbasicauth\"> Basicauth </<a></li>" << "<li><a href=\"/httpdigestauth\"> Digestauth </<a></li>"; condat << "</ul></body></html>"; curres.send(curcon,condat.c_str(),condat.size()); std::string html; (condat.parse())->printHtmlElement(html); curres.send(curcon,html.c_str(),html.length()); }else if(strncmp(cururl,"/httpbasicauth",strlen(cururl))==0 || strncmp(cururl,"/httpdigestauth",strlen(cururl))==0){ libhttppp::HttpAuth httpauth; Loading @@ -92,7 +94,9 @@ public: curres.setState(HTTP200); curres.setVersion(HTTPVERSION(1.1)); curres.setContentType("text/html"); curres.send(curcon,condat.c_str(),condat.size()); std::string html; (condat.parse())->printHtmlElement(html); curres.send(curcon,html.c_str(),html.length()); return; }else{ libhttppp::HttpResponse curres; Loading examples/httpcon.cpp +3 −1 Changes for examples/httpcon.cpp: 3 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -57,7 +57,9 @@ void sendResponse(netplus::con *curcon,libhttppp::HttpRequest *curreq) { << "<br/>"; } condat << "</body></html>"; curres.send(curcon,condat.c_str(),condat.size()); std::string html; (condat.parse())->printHtmlElement(html); curres.send(curcon,html.c_str(),html.length()); }; class Controller : public netplus::event { Loading examples/httpcookie.cpp +4 −1 Changes for examples/httpcookie.cpp: 4 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -60,7 +60,10 @@ public: setCookieForm(); parseCookie(); _HTMLDat << "</body></html>"; _Curres.send(_Curcon,_HTMLDat.c_str(),_HTMLDat.size()); std::string html; (_HTMLDat.parse())->printHtmlElement(html); _Curres.send(_Curcon,html.c_str(),html.length()); }; const char *getData(const char *key){ Loading examples/httpform.cpp +6 −4 Changes for examples/httpform.cpp: 6 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -176,10 +176,12 @@ private: << "</form>" << "</div></br>" << "<div style=\"border: thin solid black\">" << "<h2>Output</h2>" << formdat.c_str() << "</div></body></html>"; curres.send(curcon, condat.c_str(), condat.length()); << "<h2>Output</h2>"; condat+=formdat; condat << "</div></body></html>"; std::string html; (condat.parse())->printHtmlElement(html); curres.send(curcon, html.c_str(), html.length()); }; }; Loading examples/httpproxy.cpp +3 −1 Changes for examples/httpproxy.cpp: 3 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -57,7 +57,9 @@ void sendResponse(netplus::con *curcon,libhttppp::HttpRequest *curreq) { << "<br/>"; } condat << "</body></html>"; curres.send(curcon,condat.c_str(),condat.size()); std::string html; (condat.parse())->printHtmlElement(html); curres.send(curcon,html.c_str(),html.length()); }; class Controller : public netplus::event { Loading Loading
examples/httpauth.cpp +6 −2 Changes for examples/httpauth.cpp: 6 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -67,7 +67,9 @@ public: << "<li><a href=\"/httpbasicauth\"> Basicauth </<a></li>" << "<li><a href=\"/httpdigestauth\"> Digestauth </<a></li>"; condat << "</ul></body></html>"; curres.send(curcon,condat.c_str(),condat.size()); std::string html; (condat.parse())->printHtmlElement(html); curres.send(curcon,html.c_str(),html.length()); }else if(strncmp(cururl,"/httpbasicauth",strlen(cururl))==0 || strncmp(cururl,"/httpdigestauth",strlen(cururl))==0){ libhttppp::HttpAuth httpauth; Loading @@ -92,7 +94,9 @@ public: curres.setState(HTTP200); curres.setVersion(HTTPVERSION(1.1)); curres.setContentType("text/html"); curres.send(curcon,condat.c_str(),condat.size()); std::string html; (condat.parse())->printHtmlElement(html); curres.send(curcon,html.c_str(),html.length()); return; }else{ libhttppp::HttpResponse curres; Loading
examples/httpcon.cpp +3 −1 Changes for examples/httpcon.cpp: 3 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -57,7 +57,9 @@ void sendResponse(netplus::con *curcon,libhttppp::HttpRequest *curreq) { << "<br/>"; } condat << "</body></html>"; curres.send(curcon,condat.c_str(),condat.size()); std::string html; (condat.parse())->printHtmlElement(html); curres.send(curcon,html.c_str(),html.length()); }; class Controller : public netplus::event { Loading
examples/httpcookie.cpp +4 −1 Changes for examples/httpcookie.cpp: 4 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -60,7 +60,10 @@ public: setCookieForm(); parseCookie(); _HTMLDat << "</body></html>"; _Curres.send(_Curcon,_HTMLDat.c_str(),_HTMLDat.size()); std::string html; (_HTMLDat.parse())->printHtmlElement(html); _Curres.send(_Curcon,html.c_str(),html.length()); }; const char *getData(const char *key){ Loading
examples/httpform.cpp +6 −4 Changes for examples/httpform.cpp: 6 added lines, 4 removed lines. Original line number Diff line number Diff line Loading @@ -176,10 +176,12 @@ private: << "</form>" << "</div></br>" << "<div style=\"border: thin solid black\">" << "<h2>Output</h2>" << formdat.c_str() << "</div></body></html>"; curres.send(curcon, condat.c_str(), condat.length()); << "<h2>Output</h2>"; condat+=formdat; condat << "</div></body></html>"; std::string html; (condat.parse())->printHtmlElement(html); curres.send(curcon, html.c_str(), html.length()); }; }; Loading
examples/httpproxy.cpp +3 −1 Changes for examples/httpproxy.cpp: 3 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -57,7 +57,9 @@ void sendResponse(netplus::con *curcon,libhttppp::HttpRequest *curreq) { << "<br/>"; } condat << "</body></html>"; curres.send(curcon,condat.c_str(),condat.size()); std::string html; (condat.parse())->printHtmlElement(html); curres.send(curcon,html.c_str(),html.length()); }; class Controller : public netplus::event { Loading