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 116 by Douglas Thrift, 2004-03-17T00:24:32-08:00 vs.
Revision 117 by Douglas Thrift, 2004-03-17T02:02:43-08:00

# Line 67 | Line 67 | void Bender::bend(const string& path, co
67          else if (agent == matcher(string("^Mozilla/4.0 \\(compatible; MSIE (\\d+)")
68                  + "\\.(\\d+)(\\w+)?; .*\\)$"))
69          {
70 <                //
70 >                int version;
71 >                istringstream number(matcher[1]);
72  
73 <                pass(path);
73 >                number >> version;
74 >
75 >                if (version >= 6)
76 >                {
77 >                        pass(path);
78 >                }
79 >                else
80 >                {
81 >                        bend(path);
82 >                }
83          }
84          else if (agent == matcher(string("^Mozilla/5.0 \\(.*; rv:(\\d+)\\.(\\d+)(")
85                  + "\\.d+)?(\\w+)?\\) Gecko\\/.*"))
86          {
87 <                //
88 <                
89 <                pass(path);
87 >                int major, minor;
88 >                istringstream number(matcher[1] + ' ' + matcher[2]);
89 >
90 >                number >> major;
91 >                number >> minor;
92 >
93 >                if (major > 1 || (major == 1 && minor >= 5))
94 >                {
95 >                        pass(path);
96 >                }
97 >                else
98 >                {
99 >                        bend(path);
100 >                }
101          }
102          else
103          {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines