4 |
|
// |
5 |
|
// $Id$ |
6 |
|
|
7 |
– |
#include "Bender.hpp" |
7 |
|
#include "Matcher/Matcher.hpp" |
8 |
|
|
9 |
< |
#include <menes-api/exename.hpp> |
9 |
> |
#include <menes-api/console.hpp> |
10 |
> |
#include <menes-api/environment.hpp> |
11 |
|
#include <menes-api/files.hpp> |
12 |
|
#include <menes-api/process.hpp> |
13 |
|
#include <menes-app/simple.hpp> |
14 |
+ |
#include <menes-ios/helpers.hpp> |
15 |
+ |
|
16 |
+ |
class Bender |
17 |
+ |
{ |
18 |
+ |
private: |
19 |
+ |
void bend(const ext::String& path, const ext::String& agent); |
20 |
+ |
void bend(const ext::String& path); |
21 |
+ |
void pass(const ext::String& path); |
22 |
+ |
public: |
23 |
+ |
Bender(); |
24 |
+ |
}; |
25 |
|
|
26 |
|
struct Environment |
27 |
|
{ |
48 |
|
|
49 |
|
bend(path, env.get("HTTP_USER_AGENT")); |
50 |
|
} |
51 |
< |
catch (ext::Exception e) |
51 |
> |
catch (ext::Exception) |
52 |
|
{ |
53 |
|
api::Cout << "Status: 404\r\n" |
54 |
|
<< "Content-Type: text/html; charset=ISO-8859-1\r\n\r\n" |
106 |
|
api::Cout << "Content-Type: " << type << "\r\n\r\n" << output; |
107 |
|
} |
108 |
|
else pass(path); |
98 |
– |
|
99 |
– |
xslt.Join(); |
109 |
|
} |
110 |
|
|
111 |
|
void Bender::pass(const ext::String& path) |