The function drupal_environment_initialize calls request_path but does not give any way to force the path variable to be reset. The proposed changes are:
add $opt to:
function drupal_environment_initialize($opt=0) {
change call to request path to add opt:
$_GET['q'] = request_path($opt);
and then change request path:
function request_path($opt=0) {
if (isset($path) && ! $opt) {
return $path;
}
The only people who would want this change would be anyone looking for the highest possible performance by running drupal inside an object storage system.
Comments
Comment #1
dawehnerIt seems to be that on the longrun everything should be converted to a symfony request object, which can be altered using some kernel events, so it seems to be that this issue should be maybe closed?
Comment #2
dwanta commentedprobably have the same issue there.
what I created is a forking drupal instance, so bootstrap full is called once, then forked for each request with the session and user handled properly, except for this one issue with the path staying static in the child process.
this server is very fast, using top -d 1 doesn't even register a php process as I keep clicking on my complex module. response time seems to be limited by my animate javascript call at .1sec and you can also move off your module onto other servers in a distributed manner, ie my code is not even located on the apache server itself, and my code uses a second database so security is maintained in case of a drupal hack.
the code is about 250 lines, I just wrote it this weekend.
Comment #3
dwanta commentedfound some additional changes in common.inc for the ob_flush() in drupal_page_footer:
add $opt=0 here (~line 2536):
function drupal_deliver_page($page_callback_result, $default_delivery_callback = NULL, $opt=0) {
2547:
$delivery_callback($page_callback_result, $opt);
2569:
function drupal_deliver_html_page($page_callback_result,$opt=0) {
2667:
drupal_page_footer($opt);
2676:
function drupal_page_footer($opt=0) {
2691:
if( !$opt ) ob_flush();
Comment #4
dawehnerDrupal 8 has the current path service, so theoretically you could play around with it, even its obviously not recommended.