Skip to content

Commit

Permalink
Adjust process logic to escape pound sign in furl
Browse files Browse the repository at this point in the history
  • Loading branch information
vkuznet committed Apr 20, 2021
1 parent 6a5e0e3 commit 2007d43
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions das/das.go
Original file line number Diff line number Diff line change
Expand Up @@ -643,16 +643,17 @@ func ProcessLogic(dasquery dasql.DASQuery, maps []mongo.DASRecord, selectedServi
if urn == "rules4dataset" || urn == "rules4block" || urn == "rules4file" {
// adjust rest URL
furl = fmt.Sprintf("%s/rules", furl)
if strings.Contains(furl, "#") {
furl = strings.Replace(furl, "#", "%23", -1)
}
}
} else {
furl = FormRESTUrl(dasquery, dmap)
}
} else {
furl = FormUrlCall(dasquery, dmap)
}
// adjust url with pound sign
if strings.Contains(furl, "#") {
furl = strings.Replace(furl, "#", "%23", -1)
}
if furl == "local_api" && !dasmaps.MapInList(dmap, localApis) {
localApis = append(localApis, dmap)
} else if furl != "" {
Expand Down

0 comments on commit 2007d43

Please sign in to comment.