ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/Bender/Bender.cpp
(Generate patch)

Comparing Bender/Bender.cpp (file contents):
Revision 119 by Douglas Thrift, 2004-03-17T21:15:24-08:00 vs.
Revision 121 by Douglas Thrift, 2004-03-18T23:26:40-08:00

# Line 42 | Line 42 | Bender::Bender()
42                          file.close();
43  
44                          bend(path, sgetenv("HTTP_USER_AGENT"));
45 <
46 <                        return;
45 >                }
46 >                else
47 >                {
48 >                        cout << "Status: 404\n"
49 >                                << "Content-Type: text/html; charset=ISO-8859-1\n\n"
50 >                                << "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n"
51 >                                << "<html><head>\n"
52 >                                << "<title>404 Not Found</title>\n"
53 >                                << "</head><body>\n"
54 >                                << "<h1>Not Found</h1>\n"
55 >                                << "<p>The requested URL " << sgetenv("PATH_INFO") << " was no"
56 >                                << "t found on this server.</p>\n"
57 >                                << "<hr />\n"
58 >                                << sgetenv("SERVER_SIGNATURE")
59 >                                << "</body></html>\n";
60                  }
61          }
62 <
63 <        cout << "Status: 404\n"
64 <                << "Content-Type: text/html; charset=ISO-8859-1\n\n"
65 <                << "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n"
53 <                << "<html><head>\n"
54 <                << "<title>404 Not Found</title>\n"
55 <                << "</head><body>\n"
56 <                << "<h1>Not Found</h1>\n"
57 <                << "<p>The requested URL " << sgetenv("PATH_INFO") << " was not found "
58 <                << "on this server.</p>\n"
59 <                << "<hr />\n"
60 <                << sgetenv("SERVER_SIGNATURE")
61 <                << "</body></html>\n";
62 >        else
63 >        {
64 >                cout << "Location: http://computers.douglasthrift.net/bender.xml\n\n";
65 >        }
66   }
67  
68   void Bender::bend(const string& path, const string& agent)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines