+ostream& operator<<(ostream& os, const HTTPRequest& req) throw(sockerr) {
+#ifdef DEBUG
+ cerr << __FILE__ << "(" << __LINE__ << ")"
+ << ": 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
+