| 245 | } |
| 246 | |
| 247 | void HttpHeaderProcessorTest::testGetHeaderString() |
| 248 | { |
| 249 | HttpHeaderProcessor proc(HttpHeaderProcessor::CLIENT_PARSER); |
| 250 | std::string hd = "HTTP/1.1 200 OK\r\n" |
| 251 | "Date: Mon, 25 Jun 2007 16:04:59 GMT\r\n" |
| 252 | "Server: Apache/2.2.3 (Debian)\r\n" |
| 253 | "Last-Modified: Tue, 12 Jun 2007 14:28:43 GMT\r\n" |
| 254 | "ETag: \"594065-23e3-50825cc0\"\r\n" |
| 255 | "Accept-Ranges: bytes\r\n" |
| 256 | "Content-Length: 9187\r\n" |
| 257 | "Connection: close\r\n" |
| 258 | "Content-Type: text/html; charset=UTF-8\r\n" |
| 259 | "\r\nputbackme"; |
| 260 | |
| 261 | CPPUNIT_ASSERT(proc.parse(hd)); |
| 262 | |
| 263 | CPPUNIT_ASSERT_EQUAL( |
| 264 | std::string("HTTP/1.1 200 OK\r\n" |
| 265 | "Date: Mon, 25 Jun 2007 16:04:59 GMT\r\n" |
| 266 | "Server: Apache/2.2.3 (Debian)\r\n" |
| 267 | "Last-Modified: Tue, 12 Jun 2007 14:28:43 GMT\r\n" |
| 268 | "ETag: \"594065-23e3-50825cc0\"\r\n" |
| 269 | "Accept-Ranges: bytes\r\n" |
| 270 | "Content-Length: 9187\r\n" |
| 271 | "Connection: close\r\n" |
| 272 | "Content-Type: text/html; charset=UTF-8\r\n" |
| 273 | "\r\n"), |
| 274 | proc.getHeaderString()); |
| 275 | } |
| 276 | |
| 277 | void HttpHeaderProcessorTest::testGetHttpRequestHeader() |
| 278 | { |
nothing calls this directly
no test coverage detected