0

I am using Zend_Http_Client as follows:

$client = new Zend_Http_Client($apiURL);

if (strpos($restriction, 'c') !== false)
{
    $client->setParameterGet(array(
        'channels' => $channels,
    ));
}

$client->setParameterGet(array(
    'limit' => $limit,
    'offset' => $offset,
));

$feed = $client->request()->getBody();

Simple, queries an API with a series of parameters. The problem is the the parameter for 'channels'. This parameter is a comma delimited list if pre-approved channels.

My question is, is there a limit to the size of these parameters? If this channels list gets too long, will I have issues?

Jason Axelrod
  • 7,155
  • 10
  • 50
  • 78
  • You are only limited by the URL maximum length depending on the browser used ~2kB, have a look here : http://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url – sdespont Feb 20 '13 at 14:32

1 Answers1

0

The HTTP spec does not specify a limit, and Zend_Http_Client does not artificially enforce one, so no, this shouldn't be an issue.

Tim Fountain
  • 33,093
  • 5
  • 41
  • 69
  • It is limited by the max URL length alowed : http://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url – sdespont Feb 20 '13 at 14:33
  • Okay, and as the answer in that question says, "The HTTP protocol does not place any a prior limit on the length of a URI". Most of the issues there relate to browser limitations, which do not apply here. But yes Amazon's own web server software may have some max URL length limitation, but if so it's unlikely to be low enough to cause any issues in practice. – Tim Fountain Feb 20 '13 at 14:43