aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill "Coke" Coleda <will@coleda.com>2015-05-19 12:00:22 -0400
committerWill "Coke" Coleda <will@coleda.com>2015-05-19 12:00:22 -0400
commit6ed4ca07b223d5d56d1b7475d9dce2a43b6eb502 (patch)
treea867669133bea2a3e221b3f00f1bf00457d94e33
parentf704edacef5faf4fbe0984cc9f8b69b88acbe47a (diff)
Unify get request for proxy/non-proxy
ecosystem host confused by the http/1.0 attempt there (used to work fine against feather)
-rw-r--r--tools/build/panda-state.p63
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/build/panda-state.p6 b/tools/build/panda-state.p6
index 7381f89..63f0316 100644
--- a/tools/build/panda-state.p6
+++ b/tools/build/panda-state.p6
@@ -37,12 +37,11 @@ sub fetch-projects-json($to) {
if %*ENV<http_proxy> {
my ($host, $port) = %*ENV<http_proxy>.split('/').[2].split(':');
$s = IO::Socket::INET.new(host=>$host, port=>$port.Int);
- $s.send("GET http://ecosystem-api.p6c.org/projects.json HTTP/1.1\nHost: ecosystem-api.p6c.org\nAccept: */*\nConnection: Close\n\n");
}
else {
$s = IO::Socket::INET.new(:host<ecosystem-api.p6c.org>, :port(80));
- $s.send("GET /projects.json HTTP/1.0\n\n");
}
+ $s.send("GET http://ecosystem-api.p6c.org/projects.json HTTP/1.1\nHost: ecosystem-api.p6c.org\nAccept: */*\nConnection: Close\n\n");
my ($buf, $g) = '';
$buf ~= $g while $g = $s.get;