(times []int64, identifier string)
| 30 | } |
| 31 | |
| 32 | func cbNotFoundDifference(times []int64, identifier string) { |
| 33 | if len(times)%2 == 0 { |
| 34 | for i := 0; i < len(times); i += 2 { |
| 35 | dif := times[i] - times[i+1] |
| 36 | if dif >= int64(Config.HMDiff) { |
| 37 | msg := fmt.Sprintf("The time difference (%d) was equal or higher than the threshold (%d)", dif, Config.HMDiff) |
| 38 | Print(msg, Yellow) |
| 39 | return |
| 40 | } |
| 41 | } |
| 42 | } else { |
| 43 | msg := fmt.Sprintf("%s: len(times) mod 2 != 0", identifier) |
| 44 | Print(msg, Yellow) |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | /* Check if the parameter "cb" (or any other defined by flag -cb), the headers "accept-encoding, accept, cookie, origin" or any cookie can be used as cachebuster */ |
| 49 | func CheckCache(parameterList []string, headerList []string) (CacheStruct, bool, []error) { |
no test coverage detected