MCPcopy
hub / github.com/gofiber/fiber / Release

Method Release

client/cookiejar.go:405–415  ·  view source on GitHub ↗

Release releases all stored cookies. After this, the CookieJar is empty and must not be used again.

()

Source from the content-addressed store, hash-verified

403// Release releases all stored cookies. After this, the CookieJar is empty and
404// must not be used again.
405func (cj *CookieJar) Release() {
406 // FOLLOW-UP performance optimization:
407 // Currently, a race condition is found because the reset method modifies a value
408 // that is not a copy but a reference. A solution would be to make a copy.
409 // for _, v := range cj.hostCookies {
410 // for _, c := range v {
411 // fasthttp.ReleaseCookie(c)
412 // }
413 // }
414 cj.hostCookies = nil
415}
416
417// searchCookieByKeyAndPath looks up a cookie by its key and path from the provided slice of cookies.
418func searchCookieByKeyAndPath(key, path []byte, cookies []storedCookie) *fasthttp.Cookie {

Callers 2

ReleaseCookieJarFunction · 0.45
ResetMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected