Compare commits

...

3 Commits

Author SHA1 Message Date
Cory Bennett 5b5f0d5ed4 version bump 2018-08-04 14:22:05 -07:00
Cory Bennett ddee8a58a9 Updated Changelog 2018-08-04 14:22:05 -07:00
Cory Bennett ee69afadd0 [#201] update required library, failing to populate cookiejar from cookies file 2018-08-04 14:20:03 -07:00
4 changed files with 13 additions and 6 deletions
+4
View File
@@ -1,5 +1,9 @@
# Changelog
## 1.0.20 - 2018-08-04
* [[#201](https://github.com/Netflix-Skunkworks/go-jira/issues/201)] update required library, failing to populate cookiejar from cookies file [Cory Bennett] [[ee69afa](https://github.com/Netflix-Skunkworks/go-jira/commit/ee69afa)]
## 1.0.19 - 2018-08-02
* [[#199](https://github.com/Netflix-Skunkworks/go-jira/issues/199)] [[#198](https://github.com/Netflix-Skunkworks/go-jira/issues/198)] update http client library, fix issues with internal login retries [Cory Bennett] [[0cba806](https://github.com/Netflix-Skunkworks/go-jira/commit/0cba806)]
Generated
+1 -1
View File
@@ -39,7 +39,7 @@
branch = "master"
name = "github.com/coryb/oreo"
packages = ["."]
revision = "efd7a2135270bc44f64af39446c7226057e6953d"
revision = "3e1b88fc08f134aa91ccfb5d58c983ca8ab42589"
[[projects]]
name = "github.com/davecgh/go-spew"
+1 -1
View File
@@ -7,7 +7,7 @@ import (
var log = logging.MustGetLogger("jira")
const VERSION = "1.0.19"
const VERSION = "1.0.20"
type Jira struct {
Endpoint string `json:"endpoint,omitempty" yaml:"endpoint,omitempty"`
+7 -4
View File
@@ -182,11 +182,14 @@ func (c *Client) initCookieJar() (err error) {
return err
}
for _, cookie := range cookies {
url, err := url.Parse(cookie.Domain)
if err != nil {
return err
// this is dumb, cookie.Domain *must not* have a scheme or port url.Parse will parse strings like "localhost"
// into the Path variable, not Host. So lets just force Host. We also need to set arbitrary http/https Scheme
// as Jar.SetCookies will ignore cookies where the url does not have a http/https Scheme
u := &url.URL{
Scheme: "http",
Host: cookie.Domain,
}
c.Jar.SetCookies(url, []*http.Cookie{cookie})
c.Jar.SetCookies(u, []*http.Cookie{cookie})
}
return nil
}