tracker issue : CF-3917003

select a category, or use search below
(searches all categories and all time range)
Title:

[ANeff] ER for: allow CAPSLOCK-friendly /REST/

| View in Tracker

Status/Resolution/Reason: Closed/Won't Fix/

Reporter/Name(from Bugbase): Aaron Neff / Aaron Neff (Aaron Neff)

Created: 01/07/2015

Components: REST Services

Versions: 11.0

Failure Type: Enhancement Request

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Minor / Very few users will encounter

Locale/System: English / Win All

Vote Count: 0

Currently, the case-sensitivity of the "/rest/" portion of REST URLs prevents them from being CAPSLOCK-friendly.

Steps to reproduce:

Application.cfc
---------------
component {
  THIS.name = "restcaps";
  function onApplicationStart() {
    restInitApplication(expandPath("./"), "foo", {useHOST=true});
  }
}

index.cfm is empty file

R.cfc
-----
component restpath="{b:[bB][aA][rR]}" {remote string function abc() httpmethod="GET" {return "foobar";}}

1) In uriworkermap.properties, add: /REST/* = cfusion
2) In web.xml, add:
    <servlet-mapping id="coldfusion_mapping_9999">
        <servlet-name>CFRestServlet</servlet-name>
        <url-pattern>/REST/*</url-pattern>
    </servlet-mapping>
3) Restart CF
4) Browse to WWW.DOMAIN.COM/REST/FOO/BAR and see 404 (bad)
5) Browse to WWW.DOMAIN.COM/rest/FOO/BAR and see "foobar" (good)

Sometimes users type URLs w/ CAPSLOCK on (I've observed this). Browsers only lowercase the host portion before passing the URL to the web server. Since we can't control how users type and since CAPSLOCK breaks REST URLs, can UPPERCASE "/REST/" please be allowed?

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3917003

External Customer Info:
External Company:  
External Customer Name: itisdesign
External Customer Email:  
External Test Config: Verified w/ CF11 Update 3 Standalone Enterprise on Windows 8.1 Pro w/ IIS

Attachments:

Comments:

Tomcat is case sensitive and so are the web servers such as Apache. There is no way we can support the URL to be case insensitive. As that can't be done, there is no point in allowing only "/rest" to be case insensitive. If this is a specific requirement for you, you can always change this in the web.xml.
Comment by Rupesh K.
9071 | January 07, 2015 04:11:53 AM GMT
Hi Rupesh, By "change this in the web.xml", do you mean add the following? <servlet-mapping id="coldfusion_mapping_9999"> <servlet-name>CFRestServlet</servlet-name> <url-pattern>/REST/*</url-pattern> </servlet-mapping> I made that change (in addition to adding /REST/* = cfusion in uriworkermap.properties and restarting CF), but it didn't resolve the issue for me. Thanks!, -Aaron
Comment by External U.
9072 | January 07, 2015 04:19:55 AM GMT
Yes, that should take care of it. You can first verify this on the internal tomcat server on port 8500. Once that works, you can make the required change in the connector configuration for the webserver.
Comment by Rupesh K.
9073 | January 07, 2015 05:07:41 AM GMT
Hi Rupesh, Could you please try my repro steps? They contain the web.xml and uriworkermap.properties edits. Yet the "/rest/" is still case sensitive. If #CF-3199283 had been fixed completely, then this issue would've already been resolved. Thanks!, -Aaron
Comment by External U.
9074 | January 07, 2015 05:08:58 AM GMT
Hi Rupesh, Thank you for confirming. And looks like we posted at the same time. I'm certain the web.xml & uriworkermap.properties edits worked in standalone in CF10. I will look into this further and follow-up. Thanks!, -Aaron
Comment by External U.
9075 | January 07, 2015 05:16:15 AM GMT
Just noting that: Elderly type w/ CAPS LOCK on, regardless of CF version. For that reason, it makes sense to also support "/REST". Thanks!, -Aaron
Comment by External U.
9076 | June 24, 2015 09:35:21 AM GMT