1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +01:00

Fix conduit host check

Summary:
conduit was using getProductionURI instead of getURI for checking that the
request was sent to the correct host, which causes problems in some dev
environments

Test Plan:
  echo '{}' | arc call-conduit --conduit-uri=mydevserver

where my dev server is configured with phabricator.production-uri pointing to
prod instead of my devserver

Reviewers: epriestley, btrahan, jungejason

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1543
This commit is contained in:
Nick Harper 2012-02-01 22:11:49 -08:00
parent 82c6f275bd
commit c3543c80cd

View file

@ -1,7 +1,7 @@
<?php
/*
* Copyright 2011 Facebook, Inc.
* Copyright 2012 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -85,7 +85,7 @@ abstract class ConduitAPIMethod {
$host->setPath('/');
$host = (string)$host;
$self = PhabricatorEnv::getProductionURI('/');
$self = PhabricatorEnv::getURI('/');
if ($self !== $host) {
throw new Exception(
"Your client is connecting to this install as '{$host}', but it is ".