google / safebrowsing

Safe Browsing API Go Client
Apache License 2.0
470 stars 129 forks source link

LookupURLs first call returns bad data #91

Closed qRoC closed 5 years ago

qRoC commented 5 years ago

Code for reproduce:

for i := 0; i < 3; i++ {
    threats, _ := sb.LookupURLs([]string{
        "http://testsafebrowsing.appspot.com/apiv4/ANY_PLATFORM/MALWARE/URL/",
        "http://testsafebrowsing.appspot.com/apiv4/ANY_PLATFORM/MALWARE/URL/",
        "http://testsafebrowsing.appspot.com/apiv4/ANY_PLATFORM/MALWARE/URL/",
        "http://testsafebrowsing.appspot.com/apiv4/ANY_PLATFORM/MALWARE/URL/",
        "https://google.com",
    })
    for _, threat := range threats {
        println(len(threat))
    }
    println("-")
}

Actual result:

4
4
4
4
0
-
1
1
1
1
0
-
1
1
1
1
0
-