| 822 | } |
| 823 | |
| 824 | static bool |
| 825 | initRequestProcessing(InterceptData &int_data, void *edata, bool &write_response) |
| 826 | { |
| 827 | TSAssert(int_data.initialized == false); |
| 828 | if (!int_data.init(static_cast<TSVConn>(edata))) { |
| 829 | LOG_ERROR("Could not initialize intercept data!"); |
| 830 | return false; |
| 831 | } |
| 832 | |
| 833 | if (int_data.creq.status == TS_HTTP_STATUS_OK) { |
| 834 | for (StringList::iterator iter = int_data.creq.file_urls.begin(); iter != int_data.creq.file_urls.end(); ++iter) { |
| 835 | if (!int_data.fetcher->addFetchRequest(*iter)) { |
| 836 | LOG_ERROR("Couldn't add fetch request for URL [%s]", iter->c_str()); |
| 837 | } else { |
| 838 | LOG_DEBUG("Added fetch request for URL [%s]", iter->c_str()); |
| 839 | } |
| 840 | } |
| 841 | } else { |
| 842 | LOG_DEBUG("Client request status [%d] not ok; Not fetching URLs", int_data.creq.status); |
| 843 | write_response = true; |
| 844 | } |
| 845 | return true; |
| 846 | } |
| 847 | |
| 848 | static bool |
| 849 | readInterceptRequest(InterceptData &int_data) |
no test coverage detected