CodeIgniter Forums

Full Version: $.post() Method fails with decimal value in URL
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This is driving my crazy.  This POST returns a 404 Not Found error when there is a decimal value in the URL:

But this POST succeeds and returns 200 OK when I remove the decimal value:

I'm not sure if this is relevant, but I recently upgraded from CI 2.2.x to 3.1 and I never used to have this problem before.  I don't think I need to encode the value because decimals are used in URLs all the time.   

I hope someone can help me find the problem.
You need to url encode it it thinks the decimal is an http place holder.
Thanks for the assist. Is there anything different about CI 3.1 compared to CI 2.2 that would cause the different functionality? Why did this work without the need to encode in CI 2.2?
. (dot) are a acceptable URI character. Please see $config['permitted_uri_chars'] in /application/config/config.php in case it's missing.

I haven't tested (dot) myself.

PHP Code:
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-'