• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
multiple server requests with IE-8 and https

#1
[eluser]srgreenwood[/eluser]
we are running CI 1.7.2 on linux apache environment

we see in the log file a message
ERROR - 2011-04-17 10:35:59 --> 404 Page Not Found --> payment/:

We are trying to understand what is causing this message since it appears that the server with an IE8 client is sending 2 requests to our CI server. So far we have only found this occurring with IE8 and a https:// url. http: with IE8 doesn't exhibit the behavior, nor do we see it with Firefox with or without https://.

We've tracked it down by adding log messages to CodeIgniter.php. As the log below indicates on a single click in a menu (a link), the main loop is being fire twice. The second time is missing the method and parameter. This causes the main loop to fail the "is_callable" test and issue the 404 and exit. I don't think it is a CI bug, but we are baffled about the behavior. We have no routing in routes.php and there is no apache rewrite going on (no .htaccess file).

Anybody got an idea of what is going on?

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?>

TEST - 2011-04-17 10:35:58 --> codeigniter.php -- after load base controller
TEST - 2011-04-17 10:35:58 --> codeigniter.php -- after load app controller
TEST - 2011-04-17 10:35:58 --> codeigniter.php -- after include app controller
TEST - 2011-04-17 10:35:58 --> codeigniter.php -- after class check
TEST - 2011-04-17 10:35:58 --> codeigniter.php -- before is_callable check
TEST - 2011-04-17 10:35:58 --> codeigniter.php -- after is_callable check
TEST - 2011-04-17 10:35:58 --> codeigniter.php - before output
TEST - 2011-04-17 10:35:58 --> codeigniter.php - after output
TEST - 2011-04-17 10:35:58 --> codeigniter.php - after db close
TEST - 2011-04-17 10:35:59 --> codeigniter.php -- after load base controller
TEST - 2011-04-17 10:35:59 --> codeigniter.php -- after load app controller
TEST - 2011-04-17 10:35:59 --> codeigniter.php -- after include app controller
TEST - 2011-04-17 10:35:59 --> codeigniter.php -- after class check
TEST - 2011-04-17 10:35:59 --> codeigniter.php -- before is_callable check
ERROR - 2011-04-17 10:35:59 --> 404 Page Not Found --> payment/:

#2
[eluser]InsiteFX[/eluser]
Make sure you are not setting this!
Code:
$config['sess_match_ip'] = FALSE;  // do not set this to TRUE for IE it will drop your sessions!

InsiteFX

#3
[eluser]srgreenwood[/eluser]
Thanks for the suggestion - keep them coming

in config.php
$config['sess_match_ip'] = FALSE;

this is the only assignment to this array element in the entire code tree.

#4
[eluser]InsiteFX[/eluser]
I would use the database sessions for security reasons, plus cookies can only hold 4kb of data.

Also with IE you need to change this config item!
application/config/config.php
Code:
// Change this!
$config['sess_cookie_name']        = 'ci_session';

// To this: IE doe's not like an underscore in the cookie name!!!
$config['sess_cookie_name']        = 'cisession';

InsiteFX

#5
[eluser]srgreenwood[/eluser]
We are using a table for (ci_session) to track sessions.

What are the symptoms of having an underscore in the cookie name? The site for the most part works with IE, however, we have 2 requests on the server: one that is correct and second without the method name and parameters.

#6
[eluser]WanWizard[/eluser]
If you see two requests in the logs for a single page request from the browser, check your logs for a missing asset.

If your page contains something like http://example.org/assets/img/image.png, and this file does not exist or can't be read, the rewrite rules will rewrite the image request to index.php, causing a second controller request.

#7
[eluser]srgreenwood[/eluser]
Thanks for the suggestion - we can certainly look for that.
Would you expect this behavior to be different between IE and Firefox?

Are you refering to Apache rewrite rules or routing tables within CI?

#8
[eluser]WanWizard[/eluser]
No, if this is the issue it should be consistent. And I'm refering to apache rewrite rules.

#9
[eluser]jjwe[/eluser]
I can see the same problem in our system, except the second request looks like "something/: //0". These requests were sent from ie7 and ie8.
Could you resolve the issue?

I already checked $config[‘sess_match_ip’] = FALSE; and the cookie names - there are no underscores in our cookie names.

#10
[eluser]jjwe[/eluser]
[quote author="jjwe" date="1305638497"]I can see the same problem in our system, except the second request looks like "something/: //0". These requests were sent from ie7 and ie8.
Could you resolve the issue?

I already checked $config[‘sess_match_ip’] = FALSE; and the cookie names - there are no underscores in our cookie names.[/quote]


Just found the problem - mootools is sending these requests. This should suppress warnings of secure and insecure content in IE. So evereything is fine with CI Wink


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.