oduwsdl / MemGator

A Memento Aggregator CLI and Server in Go
https://memgator.cs.odu.edu/api.html
MIT License
55 stars 11 forks source link

Archives configuration might require a trailing slash #67

Closed machawk1 closed 8 years ago

machawk1 commented 8 years ago

Based on 2fceeb7bfb2d74228959b9dfd35bffe17d05481f with nothing running at the specified endpoint.

memgator -a archives.json http://matkelly.com

archives.json

[
  {
    "id": "test",
    "name": "Test",
    "timemap": "http://localhost:3000",
    "timegate": "http://localhost:3000"
  }
]

error:

ERROR: 2016/05/02 10:55:41.893917 main.go:259: test => Network error: Get http://localhost:1234http://matkelly.com: dial tcp: too many colons in address localhost:1234http:

Adding a trailing slash seems to fix this issue.

archives.json

[
  {
    "id": "test",
    "name": "Test",
    "timemap": "http://localhost:1234/",
    "timegate": "http://localhost:1234/"
  }
]

error (correct behavior)

memgator -a archives.json http://matkelly.com
ERROR: 2016/05/02 10:57:27.843310 main.go:259: test => Network error: Get http://localhost:1234/http://matkelly.com: dial tcp [::1]:1234: getsockopt: connection refused
machawk1 commented 8 years ago

Verified 👍