Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/gin-gonic/gin v1.10.0
github.com/google/uuid v1.3.0
github.com/splitio/gincache v1.0.1
github.com/splitio/go-split-commons/v6 v6.1.1-0.20250414224340-9a5c36389db1
github.com/splitio/go-split-commons/v6 v6.1.1-0.20250415223836-55f450ca303b
github.com/splitio/go-toolkit/v5 v5.4.0
github.com/stretchr/testify v1.9.0
go.etcd.io/bbolt v1.3.6
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ github.com/splitio/gincache v1.0.1 h1:dLYdANY/BqH4KcUMCe/LluLyV5WtuE/LEdQWRE06IX
github.com/splitio/gincache v1.0.1/go.mod h1:CcgJDSM9Af75kyBH0724v55URVwMBuSj5x1eCWIOECY=
github.com/splitio/go-split-commons/v6 v6.1.1-0.20250414224340-9a5c36389db1 h1:le2tNqtYsipMP5PQgJWAtu3x5DbPzquYT36RUeiiVfY=
github.com/splitio/go-split-commons/v6 v6.1.1-0.20250414224340-9a5c36389db1/go.mod h1:D/XIY/9Hmfk9ivWsRsJVp439kEdmHbzUi3PKzQQDOXY=
github.com/splitio/go-split-commons/v6 v6.1.1-0.20250415223836-55f450ca303b h1:vAuwe1IFSCJNGnx/BFwnGyleKTQRcCmypV8DIwkA3fM=
github.com/splitio/go-split-commons/v6 v6.1.1-0.20250415223836-55f450ca303b/go.mod h1:D/XIY/9Hmfk9ivWsRsJVp439kEdmHbzUi3PKzQQDOXY=
github.com/splitio/go-toolkit/v5 v5.4.0 h1:g5WFpRhQomnXCmvfsNOWV4s5AuUrWIZ+amM68G8NBKM=
github.com/splitio/go-toolkit/v5 v5.4.0/go.mod h1:xYhUvV1gga9/1029Wbp5pjnR6Cy8nvBpjw99wAbsMko=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
Expand Down
5 changes: 2 additions & 3 deletions splitio/proxy/controllers/sdk.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,8 @@ func (c *SdkServerController) SplitChanges(ctx *gin.Context) {
sParam, _ := ctx.GetQuery("s")
spec, err := specs.ParseAndValidate(sParam)
if err != nil {
c.logger.Error(fmt.Sprintf("error parsing spec version: %s.", err))
ctx.JSON(http.StatusBadRequest, gin.H{"code": 400, "message": err.Error()})
return
c.logger.Error(fmt.Sprintf("error parsing spec version: %s. Defaulting to: %s", err, specs.Latest))
spec = specs.Latest
}

splits.Splits = c.patchUnsupportedMatchers(splits.Splits, spec)
Expand Down
3 changes: 1 addition & 2 deletions splitio/proxy/controllers/sdk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import (
"github.com/splitio/go-split-commons/v6/engine/grammar"
"github.com/splitio/go-split-commons/v6/engine/grammar/matchers"
"github.com/splitio/go-split-commons/v6/service"
"github.com/splitio/go-split-commons/v6/service/api/specs"
cmnStorage "github.com/splitio/go-split-commons/v6/storage"
"github.com/splitio/go-toolkit/v5/logging"
"github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -440,7 +439,7 @@ func TestSplitChangesNewMatcherNewSpec(t *testing.T) {
ctx.Request.Header.Set("SplitSDKMachineIp", "1.2.3.4")
ctx.Request.Header.Set("SplitSDKMachineName", "ip-1-2-3-4")
q := ctx.Request.URL.Query()
q.Add("s", specs.FLAG_V1_1)
q.Add("s", "1.1")
ctx.Request.URL.RawQuery = q.Encode()
router.ServeHTTP(resp, ctx.Request)

Expand Down