summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-03-15 03:20:02 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-03-15 03:20:02 (GMT)
commit6580b4e76f288c2a2591f25bc916f7a728816609 (patch)
tree77485b313ef4592b49162c2633ec42e86164acad
parente78b3cc629ff230ddb3479a036c1858a76ee7f5a (diff)
set user agent on fetch/import
-rw-r--r--rhimport/fetcher.go1
-rw-r--r--rhimport/importer.go1
2 files changed, 2 insertions, 0 deletions
diff --git a/rhimport/fetcher.go b/rhimport/fetcher.go
index f501bc6..f53ed04 100644
--- a/rhimport/fetcher.go
+++ b/rhimport/fetcher.go
@@ -117,6 +117,7 @@ func fetchFileCurl(ctx *Context, res *Result, uri *url.URL) (err error) {
easy.Setopt(curl.OPT_FOLLOWLOCATION, true)
easy.Setopt(curl.OPT_URL, ctx.SourceUri)
+ easy.Setopt(curl.OPT_USERAGENT, "Radio Helsinki Import")
cbdata := &FetcherCurlCBData{ctx: ctx, res: res, remotename: path.Base(uri.Path)}
defer cbdata.Cleanup()
diff --git a/rhimport/importer.go b/rhimport/importer.go
index 952f75a..4473ee4 100644
--- a/rhimport/importer.go
+++ b/rhimport/importer.go
@@ -286,6 +286,7 @@ func importAudio(ctx *Context, res *Result) (err error) {
easy.Setopt(curl.OPT_URL, ctx.conf.RDXportEndpoint)
easy.Setopt(curl.OPT_POST, true)
+ easy.Setopt(curl.OPT_USERAGENT, "Radio Helsinki Import")
var form *curl.Form
if form, err = importAudioCreateRequest(ctx, easy); err != nil {