| 115 | } |
| 116 | |
| 117 | bool CHttpRequest::BeforeInit() |
| 118 | { |
| 119 | if(m_WriteToFile) |
| 120 | { |
| 121 | if(m_SkipByFileTime) |
| 122 | { |
| 123 | time_t FileCreatedTime, FileModifiedTime; |
| 124 | if(fs_file_time(m_aDestAbsolute, &FileCreatedTime, &FileModifiedTime) == 0) |
| 125 | { |
| 126 | m_IfModifiedSince = FileModifiedTime; |
| 127 | } |
| 128 | } |
| 129 | |
| 130 | if(fs_makedir_rec_for(m_aDestAbsoluteTmp) < 0) |
| 131 | { |
| 132 | log_error("http", "i/o error, cannot create folder for: %s", m_aDest); |
| 133 | return false; |
| 134 | } |
| 135 | |
| 136 | m_File = io_open(m_aDestAbsoluteTmp, IOFLAG_WRITE); |
| 137 | if(!m_File) |
| 138 | { |
| 139 | log_error("http", "i/o error, cannot open file: %s", m_aDest); |
| 140 | return false; |
| 141 | } |
| 142 | } |
| 143 | return true; |
| 144 | } |
| 145 | |
| 146 | bool CHttpRequest::ConfigureHandle(void *pHandle) |
| 147 | { |
nothing calls this directly
no test coverage detected