From 0575ec6bd1f023db8d38283d755f3b740d57c19c Mon Sep 17 00:00:00 2001 From: Jacek Jendrzej Date: Tue, 17 Dec 2019 15:06:08 +0100 Subject: [PATCH] netfile: dont add default port 80 to request header, this break some redirects Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/efe51f87cce15d43f5638486e52220cd42d68bd5 Author: Jacek Jendrzej Date: 2019-12-17 (Tue, 17 Dec 2019) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/driver/netfile.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/driver/netfile.cpp b/src/driver/netfile.cpp index c40923980..1acab19c2 100644 --- a/src/driver/netfile.cpp +++ b/src/driver/netfile.cpp @@ -379,7 +379,10 @@ int request_file(URL *url) dprintf(stderr, "> %s", str); send(url->fd, str, strlen(str), 0); - snprintf(str, sizeof(str)-1, "Host: %s:%d\r\n", url->host, url->port); + if(url->port != 80) + snprintf(str, sizeof(str)-1, "Host: %s:%d\r\n", url->host, url->port); + else + snprintf(str, sizeof(str)-1, "Host: %s\r\n", url->host); dprintf(stderr, "> %s", str); send(url->fd, str, strlen(str), 0); @@ -1824,7 +1827,7 @@ void ShoutCAST_MetaFilter(STREAM_FILTER *arg) if(filterdata->stored < filterdata->len) { int bsize = (filterdata->len + 1) - filterdata->stored; - printf("filterdata->len %i bsize %i len %i\n",filterdata->len,bsize,len); + dprintf(stderr, "filterdata->len %i bsize %i len %i\n",filterdata->len,bsize,len); /*check overload size*/ if(bsize > len){ dprintf(stderr, "[%s] : error ---> bsize %i > len %i\n",__func__,bsize, len);