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 123 by Douglas Thrift, 2004-03-20T18:32:11-08:00 vs.
Revision 159 by Douglas Thrift, 2004-06-16T20:51:10-07:00

# Line 32 | Line 32 | Bender::Bender()
32   {
33          string path = sgetenv("PATH_TRANSLATED");
34  
35 <
36 <        if (path != "")
35 >        if (path != "" && sgetenv("PATH_INFO") == sgetenv("REQUEST_URI"))
36          {
37                  ifstream file(path.c_str());
38  
# Line 104 | Line 103 | void Bender::bend(const string& path)
103  
104          if (transformer.transform(path.c_str(), output) == 0)
105          {
106 <                string type = "text/html; charset=ISO-8859-1";
106 >                string type = "text/xml";
107                  Matcher matcher("http-equiv=\"Content-Type\" content=\"(.*)\"");
108  
109                  if (matcher == output.str())
# Line 122 | Line 121 | void Bender::bend(const string& path)
121  
122   void Bender::pass(const string& path)
123   {
124 <        cout << "Content-Type: text/xml; charset=ISO-8859-1\n\n";
124 >        cout << "Content-Type: text/xml\n\n";
125  
126          ifstream fin(path.c_str());
127          string line;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines