diff options
| -rw-r--r-- | project2/cgi/p2webMain.cpp | 5 | 
1 files changed, 3 insertions, 2 deletions
diff --git a/project2/cgi/p2webMain.cpp b/project2/cgi/p2webMain.cpp index 59e8d7b..25a4300 100644 --- a/project2/cgi/p2webMain.cpp +++ b/project2/cgi/p2webMain.cpp @@ -2,6 +2,7 @@  #include <cgicc/Cgicc.h>  #include <cgicc/CgiEnvironment.h>  #include <cgicc/HTTPContentHeader.h> +#include <cgicc/HTTPStatusHeader.h>  FILE * realstdout = stdout;  #include <fcgi_stdio.h>  #include "cgiEnvironment.h" @@ -68,7 +69,7 @@ int main(void)  				app.write(boost::bind(xmlSaveFileTo, out, _1, "utf-8"));  			}  			catch (const std::exception & e) { -				cgicc::HTTPContentHeader header("text/plain"); +				cgicc::HTTPStatusHeader header(500, e.what());  				header.render(IO);  				IO << "Kaboom!" << std::endl  					<< std::endl @@ -76,7 +77,7 @@ int main(void)  					<< e.what() << std::endl;  			}  			catch (...) { -				cgicc::HTTPContentHeader header("text/plain"); +				cgicc::HTTPStatusHeader header(500, "Unknown exception");  				header.render(IO);  				IO << "Kaboom!" << std::endl  					<< std::endl  | 
