| 316 | } |
| 317 | |
| 318 | DataStatus |
| 319 | HttpDataFetcherImpl::getRequestStatus(const string &url) const |
| 320 | { |
| 321 | UrlToContentMap::const_iterator iter = _pages.find(url); |
| 322 | if (iter == _pages.end()) { |
| 323 | TSError("[HttpDataFetcherImpl]Status being requested for unregistered URL [%s]", url.data()); |
| 324 | return STATUS_ERROR; |
| 325 | } |
| 326 | |
| 327 | if (!(iter->second).complete) { |
| 328 | return STATUS_DATA_PENDING; |
| 329 | } |
| 330 | |
| 331 | if ((iter->second).resp_status != TS_HTTP_STATUS_OK) { |
| 332 | return STATUS_ERROR; |
| 333 | } |
| 334 | |
| 335 | return STATUS_DATA_AVAILABLE; |
| 336 | } |
| 337 | |
| 338 | void |
| 339 | HttpDataFetcherImpl::useHeader(const HttpHeader &header) |
no test coverage detected