github.com/GeniusesGroup/libgo@v0.0.0-20220929090155-5ff932cb408e/http/header-pragma.go (about)

     1  /* For license and copyright information please see LEGAL file in repository */
     2  
     3  package http
     4  
     5  // FixPragmaCacheControl do as RFC 7234, section 5.4: Treat [Pragma: no-cache] as [Cache-Control: no-cache]
     6  func (h *header) FixPragmaCacheControl() {
     7  	if h.Get(HeaderKeyPragma) == "no-cache" {
     8  		if h.Gets(HeaderKeyCacheControl) == nil {
     9  			h.Set(HeaderKeyCacheControl, "no-cache")
    10  		}
    11  	}
    12  }