ColdFusion 10.0  -  Bug 3177732

Created on Friday, April 27, 2012

Login for more options

Title

Missing CGI.Redirect_URL

Description

I'm currently using Apache to forward missing page requests to /404.cfm and using the onMissingTemplate handler to display some database driven data based on the requested url. On CF9 I was able to use CGI.Redirect_URL and CGI.redirect_query_string to retrieve the originally queried url, but CF10 does not seem to pass these CGI variables through any longer.

Is there any way I can enable this by changing some XML or has this feature been removed or overlooked?

Test Configuration

My Hardware and Environment details:
Windows 2008 R2 SP1
64 Bit
Apache 2.2

App Language(s) English
OS Language(s) English
Platform(s) Win 2008 Server R2 64 bit
Browser(s) Browsers All

Notes (21)

  • dmerrill

    9:46:53 AM GMT+00:00 Dec 13, 2013

    OK, sorted. I had the 404 handler configured as an absolute URL, which does work in the sense that the handler gets called, but for some reason that may or may not be specific to my slightly odd networking setup, doesn't set that var. Changing it to a server-relative URL caused things to work as expected.

    Thanks to all for their help. Devil's in the details...

  • CFDad

    9:11:40 AM GMT+00:00 Dec 13, 2013

    I will say this, it's not entirely necessary to rely only on the updates to get cgi.redirect_url working. You can directly modify the mod_jk.conf file. For example, I have this chunk of code near the bottom:

    # custom environment variables
    JkEnvVar REDIRECT_URL
    JkEnvVar REDIRECT_REMOTE_HOST
    JkEnvVar REDIRECT_PATH
    JkEnvVar REDIRECT_QUERY_STRING
    JkEnvVar REDIRECT_HTTP_ACCEPT
    JkEnvVar REDIRECT_HTTP_USER_AGENT
    JkEnvVar REDIRECT_REMOTE_ADDR
    JkEnvVar REDIRECT_SERVER_NAME
    JkEnvVar REDIRECT_SERVER_PORT
    JkEnvVar REDIRECT_SERVER_SOFTWARE

  • dmerrill

    8:48:32 AM GMT+00:00 Dec 13, 2013

    Thanks for the hint about notifications.

  • Walter Seethaler

    8:15:20 AM GMT+00:00 Dec 13, 2013

    You can configure it in the preferences of this page (top right corner).
    https://bugbase.adobe.com/index.cfm?event=userPreferences

  • dmerrill

    6:54:38 AM GMT+00:00 Dec 13, 2013

    And how are you getting notified about msgs here?

  • dmerrill

    6:49:20 AM GMT+00:00 Dec 13, 2013

    Just updated Apache to 2.2.25, the latest as of now. Change date and hash of mod_jk.so match yours. Removed and re-added the connector yet again, restarted Apache and CF for good measure.

    Behavior is unchanged, CGI.REDIRECT_URL and CGI.REDIRECT_URI are empty string. Grrr.

  • B Baumgartner

    6:05:07 AM GMT+00:00 Dec 13, 2013

    Sounds weird, what is the changedate of the mod_jk.so (normally found in /{ColdFusion10-HomeDir}/config/wsconfig/1/) ?

    On my local machine with update 12 it´s "2013-11-02 14:12" (the size is 263.168 Byte and md5 hash 838da04ea25e8eb584dadf9cc58ab266). Probably the connector is not up-to-date? Have you tried to remove and add the connector again?

  • dmerrill

    5:48:22 AM GMT+00:00 Dec 13, 2013

    Interesting, but not my issue. Both CGI.REDIRECT_URL and CGI.REDIRECT_URI come back as empty string.

  • dmerrill

    5:37:19 AM GMT+00:00 Dec 13, 2013

    And not to be stupid, but I don't see any way to subscribe to issues here, so I get notified when someone posts a comment or the issue itself changes. @CFDad, how did you know about the comment/question I posted? Can't be coincidence that you just happened to come back here.

  • B Baumgartner

    5:26:13 AM GMT+00:00 Dec 13, 2013

    @dmerrill
    A dump of the cgi scope does not show all present redirect variables! Just try to output the cgi.REDIRECT_URL variable in your 404 handler:

    <cfoutput>#cgi.REDIRECT_URL#</cfoutput>

    I am using Apache 2.2.21.

  • dmerrill

    5:18:47 AM GMT+00:00 Dec 13, 2013

    @CFDad: Thanks for chiming in, but REDIRECT_URI doesn't exist in cgi either. The text 'REDIRECT' isn't present in a dump of the cgi scope, so none of those custom vars are.

    I've verified that the include of mod_jk.conf in my main apache config for this instance is working, by removing a critical alias from the main config, verifying that life is broken, adding it to mod_jk.conf, and verifying that things are normal again.

    I'm using Apache 2.2.15, which I know isn't the latest. Does anyone know if that's relevant, and if so, what the oldest compatible version of Apache would be? (I need to maintain backwards compatibility for some other things.)

  • CFDad

    2:00:17 PM GMT+00:00 Dec 12, 2013

    @dmerill depending on what you're doing you may want to see if REDIRECT_URI will work for you in some cases where you'd expect REDIRECT_URL. That was the case for me.

  • dmerrill

    12:22:47 PM GMT+00:00 Dec 12, 2013

    I removed and re-added the apache connector as described, the JkEnvVar lines listed below were added to /conf/mod_jk.conf, and the first one is REDIRECT_URL, but the behavior is unchanged for me, REDIRECT_URL doesn't exist in the cgi scope when it's called by Apache as a 404 handler.

    I've restarted both Apache and CF. Update 12 is installed, for what that's worth.

    Is there something else I need to do? Can anyone confirm that this works for them with Update 12?

    This is critical functionality. The bug was created 4/27/12, and is still open. Grumble.

  • Rupesh Kumar

    7:16:57 AM GMT+00:00 Oct 1, 2012

    @CFDad, you dont need to uninstall the server. You just need to reconfigure the connector. Please refer to this article http://help.adobe.com/en_US/ColdFusion/10.0/Installing/WSc3ff6d0ea77859461172e0811cdec18a15-7ff0.html

  • CFDad

    6:00:24 PM GMT+00:00 Sep 28, 2012

    @B Baumgartner, how did you remove and then re-add the apache connector? Did you have to uninstall CF 10 and then reinstall? I can't find a good GUI or other to help me with this process on a Mac OSX Mountain Lion.

  • B Baumgartner

    5:04:34 AM GMT+00:00 Sep 28, 2012

    Thanks, after removing and adding the apache connector, the problem is fixed now.

    New Lines in apache/conf/mod_jk.conf:

    # custom environment variables
    JkEnvVar REDIRECT_URL
    JkEnvVar REDIRECT_REMOTE_HOST
    JkEnvVar REDIRECT_PATH
    JkEnvVar REDIRECT_QUERY_STRING
    JkEnvVar REDIRECT_HTTP_ACCEPT
    JkEnvVar REDIRECT_HTTP_USER_AGENT
    JkEnvVar REDIRECT_REMOTE_ADDR
    JkEnvVar REDIRECT_SERVER_NAME
    JkEnvVar REDIRECT_SERVER_PORT
    JkEnvVar REDIRECT_SERVER_SOFTWARE

  • Rupesh Kumar

    5:22:09 AM GMT+00:00 Sep 20, 2012

    Baumgartner, this is indeed fixed. Could you please reconfigure the connector after applying the update and check if this still does not work for you?

  • B Baumgartner

    12:10:00 AM GMT+00:00 Sep 19, 2012

    Could anyone tell me, whether this error in CF 10 Update 1 is really fixed?

    In our test environment(s), this bug is still present.

    Windows 2008 R2 SP1 or Linux
    64 Bit
    Apache 2.2.1

  • BrettPR

    6:38:21 PM GMT+00:00 Jun 25, 2012

    I have just found the same problem and have backed out my install of CF10. This is critical functionality that needs to be fixed before I will consider installing CF10 in any environment.

    I suspect that it is an issue with Tomcat.

  • Walter Seethaler

    4:39:32 AM GMT+00:00 May 15, 2012

    Delete: This works fine on tomcat.
    Set: This works fine on CF9 with JRun and Apache.

  • Walter Seethaler

    4:38:37 AM GMT+00:00 May 15, 2012

    Same Problem in the CF 10 Release. This is a must-have, unless there is a workaround.

    In addition, it is no longer possible to define custom CGI-Variables in Apache-RewriteRules, e.g.:

    RewriteRule .* - [E=test:123]

    This works fine on tomcat.

Duplicate ID
Reported By Cameron.Jacobs

Status

State Closed
Status Fixed
Reason

Importance

Priority 3-High
Frequency Some users will encounter
Failure Type Incorrectly Functioning
Product Area Web Container (Tomcat)

Build

Found In Build Public Beta
Fixed In Build 282611

Attachments (0)

No Files Attached

Votes (5)

  • dmerrill

    5:19:47 AM GMT+00:00 Dec 13, 2013

    Mission critical, breaks custom redirect functionality in our app.

  • zac.spitzer

    6:48:25 PM GMT+00:00 Jun 25, 2012

    this is a nasty regression

  • BrettPR

    6:40:22 PM GMT+00:00 Jun 25, 2012

    I am not able to install CF10 in any productive environment (including development and support) until this bug is fixed. It is a critical feature in our system of providing 'friendly' URLs.

  • B Baumgartner

    5:29:37 AM GMT+00:00 May 15, 2012

    Same Problem in our Application! Need a bugfix / workaround!

  • Walter Seethaler

    5:01:11 AM GMT+00:00 May 15, 2012

    An Explanation of the problem is here under point 3:

    http://blogs.coldfusion.com/post.cfm/what-s-the-deal-with-tomcat-in-coldfusion-10

Your session has expired! Click to login
Current form data will be preserved

Cancel