Skip to content

Commit

Permalink
Fixed typos
Browse files Browse the repository at this point in the history
  • Loading branch information
lindell committed Mar 21, 2020
1 parent 315a8bb commit 78a2339
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pkg/revaboxy/reverse_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type Revaboxy struct {

// DefaultName is the name of the default version
// The version with this name will take up the rest of the probability if any remain
// when adding all probabilitys together
// when adding all probabilities together
const DefaultName = "default"

// Version is one of the versions used in the A/B/C... test
Expand Down Expand Up @@ -123,10 +123,10 @@ func New(vv []Version, settingChangers ...Setting) (*Revaboxy, error) {
if cookie != nil {
version, ok := versions[cookie.Value]
if ok {
logger.Printf("using previus used version %s", version.Name)
logger.Printf("using previous used version %s", version.Name)
modifyRequest(settings, req, version)
} else {
logger.Printf("could not use previus version %s and using a random version instead", cookie.Value)
logger.Printf("could not use previous version %s and using a random version instead", cookie.Value)
modifyRequest(settings, req, versions.getRandomVersion())
}
} else {
Expand All @@ -135,7 +135,8 @@ func New(vv []Version, settingChangers ...Setting) (*Revaboxy, error) {
}
}

// Add a cookie to the response that
// Add a cookie to the response that tracks which version the user got
// so that the following requests will use the same version
modifyResponse := func(r *http.Response) error {
name := r.Request.Header.Get(settings.headerName)
existingCookie, _ := r.Request.Cookie(settings.cookieName)
Expand Down

0 comments on commit 78a2339

Please sign in to comment.