Browse Source

提交代码

tags/v1.22.11.3^2
ychao_1983 3 years ago
parent
commit
c34d42b07d
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      modules/modelarts/modelarts.go

+ 3
- 2
modules/modelarts/modelarts.go View File

@@ -974,10 +974,10 @@ func getJupyterBaseUrl(url string) string {
}

func getCookiesAndCsrf(client *resty.Client, jupyterUrl string) ([]*http.Cookie, string) {
log.Info("jupyter url:"+jupyterUrl)
var cookies []*http.Cookie
for i := 0; i < 10; i++ {
res, err := client.R().SetCookies(cookies).Get(jupyterUrl)
res, err := http.Get(jupyterUrl)
if err != nil {
log.Error("browser jupyterUrl failed.")
return cookies, ""
@@ -987,6 +987,7 @@ func getCookiesAndCsrf(client *resty.Client, jupyterUrl string) ([]*http.Cookie,
for _, cookie := range cookies {
if cookie.Name == "_xsrf" {
xsrf = cookie.Value
break
}

}


Loading…
Cancel
Save