summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastien Douheret <sebastien.douheret@iot.bzh>2017-09-22 23:59:05 +0200
committerSebastien Douheret <sebastien.douheret@iot.bzh>2017-09-22 23:59:05 +0200
commit3bddf2b6e87ec2008e3dfb7632849f99b7eb4e55 (patch)
tree7d669006e4ea9a42ffc8123ab8ad204e77830952
parentfbfecfe0ac37ee34c940566c3b7741426f67489a (diff)
Fixed bug when not client ID detected
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
-rw-r--r--golib/httpclient.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/golib/httpclient.go b/golib/httpclient.go
index 9791910..7d3e3c7 100644
--- a/golib/httpclient.go
+++ b/golib/httpclient.go
@@ -254,7 +254,7 @@ func (c *HTTPClient) handleRequest(request *http.Request) (*http.Response, error
// Detect CSR token change
for _, item := range response.Cookies() {
- if item.Name == "CSRF-Token-"+c.id[:5] {
+ if c.id != "" && item.Name == "CSRF-Token-"+c.id[:5] {
c.csrf = item.Value
goto csrffound
}