| 34 | "For storing profiling results."); |
| 35 | |
| 36 | bool UseHTML(const HttpHeader& header) { |
| 37 | const std::string* console = header.uri().GetQuery(CONSOLE_STR); |
| 38 | if (console != NULL) { |
| 39 | return atoi(console->c_str()) == 0; |
| 40 | } |
| 41 | // [curl header] |
| 42 | // User-Agent: curl/7.12.1 (x86_64-redhat-linux-gnu) libcurl/7.12.1 ... |
| 43 | const std::string* agent = header.GetHeader(USER_AGENT_STR); |
| 44 | if (agent == NULL) { // use text when user-agent is absent |
| 45 | return false; |
| 46 | } |
| 47 | return agent->find("curl/") == std::string::npos; |
| 48 | } |
| 49 | |
| 50 | // Written by Jack Handy |
| 51 | // <A href="mailto:jakkhandy@hotmail.com">jakkhandy@hotmail.com</A> |
no test coverage detected