| 36 | } |
| 37 | |
| 38 | bool HttpFetcher::FetchETag(wchar_t const * path, std::string & etag) |
| 39 | { |
| 40 | auto request = WinHttpOpenRequest(httpSession_, L"HEAD", path, NULL, |
| 41 | WINHTTP_NO_REFERER, WINHTTP_DEFAULT_ACCEPT_TYPES, WINHTTP_FLAG_SECURE); |
| 42 | if (request == NULL) return false; |
| 43 | |
| 44 | bool result = false; |
| 45 | if (SendRequest(request, path)) { |
| 46 | result = FetchETag(request, etag); |
| 47 | } |
| 48 | |
| 49 | WinHttpCloseHandle(request); |
| 50 | return result; |
| 51 | } |
| 52 | |
| 53 | bool HttpFetcher::SendRequest(HINTERNET request, wchar_t const * path) |
| 54 | { |