Skip to content

Commit

Permalink
Fix login, use https protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
hashworks committed Jun 28, 2017
1 parent fb2c8fd commit ddbe957
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions srrdb/srrdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
"strings"
)

const srrdbURL = "http://www.srrdb.com"
const srrdbURL = "https://www.srrdb.com"

// SearchResponse holds the results of a search.
type SearchResponse struct {
Expand Down Expand Up @@ -121,7 +121,7 @@ func NewLoginCookieJar(u, p string) (*cookiejar.Jar, error) {
return errors.New("redirect")
}
response, err := client.PostForm(srrdbURL+"/account/login", v)
if err != nil && err.Error() != "Post /: redirect" {
if err != nil && err.Error()[len(err.Error())-8:] != "redirect" {
return &cookiejar.Jar{}, err
}
if !containsValidLoginCookie(response.Cookies()) {
Expand Down

0 comments on commit ddbe957

Please sign in to comment.