+ostream& operator<<(ostream& os, const HTTPRequest& req) {
+#ifdef DEBUG
+ cerr << __FILE__ << ": operator<<()" << endl;
+#endif // DEBUG
+ os << req.method_str() << " " << req.uri;
+ if (req.query.length()) {
+ os << "?" << req.query;
+ }
+ os << " HTTP/" << req.version << "\r\n"
+ << static_cast<const HTTPMessage&>(req);
+ return os;
+}
+
+} // namespace Server
+
+} // namespace PlaQui
+