1

I'm wandering what the maximum URI length is in codeigniter, and if URI segments being used as arguments to a controller function count towards the browsers GET length limit? I think most browsers cap there GET parameter length to about 2000?

Currently if my total URI length (inc. https://domain/folder/controller/function/argument) exceeds around 1560 characters I get a forbidden message.

'Forbidden You don't have permission to access /folder/controller/function/argument on this server'

If I trim the characters back to under around 1550~1560 it works fine again. I realise 1500+ is alot anyway, which is why I was wandering if URI counts towards the GET limit.

Has anyone experienced this problem? Is there a solution aside from POSTing all data?

BTW: I'm using the URI protocol AUTO in the config

Chris
  • 54,599
  • 30
  • 149
  • 186

1 Answers1

2

As far as I remember the whole URI is limited to a more or less specific length. Something is already mentioned here: What is the maximum length of a URL in different browsers?

However, it feels a little bit curious, that you require such long uris. If you append a query string of around 1000 characters length, thats already 1kB of data. In my oppinion a query string is not the right place to transport data around.

Community
  • 1
  • 1
KingCrunch
  • 128,817
  • 21
  • 151
  • 173
  • I agree, it just seems to be less than I thought, especially with codeigniter. I will just need to wrap the information in a form and post it through – Chris Apr 22 '11 at 00:28
  • I have moved to a POST based solution - it just means that a lot of things are wrapped up as buttons. Cheers – Chris Apr 26 '11 at 03:07