You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Honwai Wong (Created) (JIRA)" <ji...@apache.org> on 2011/11/07 17:00:52 UTC
[jira] [Created] (SLING-2268) Request to resource xyz/.html
resolves to xyz
Request to resource xyz/.html resolves to xyz
---------------------------------------------
Key: SLING-2268
URL: https://issues.apache.org/jira/browse/SLING-2268
Project: Sling
Issue Type: Bug
Components: Servlets
Affects Versions: Servlets Get 2.1.2
Reporter: Honwai Wong
Priority: Minor
A request to a resource with a trailing slash and an extension properly resolves to the correct resource and resource-type. From my point of view, such a request looks rather incorrect and shouldn't get served in the first place, e.g. returning a 404 response:
http://<host>:<port>/resourcexyz/.html
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (SLING-2268) Request to resource xyz/.html
resolves to xyz
Posted by "Vidar S. Ramdal (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-2268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13147761#comment-13147761 ]
Vidar S. Ramdal commented on SLING-2268:
----------------------------------------
I'm not sure. In many web applications, a request to /resourcexyz (no extension) is redirected to /resourcexyz/. Thus, /resourcexyz is an alias for /resourcexyz/.
I agree that /resourcexyz/.html does not look nice, but returning 404 when in fact /resourcexyz.html would resolve to something, seems wrong.
> Request to resource xyz/.html resolves to xyz
> ---------------------------------------------
>
> Key: SLING-2268
> URL: https://issues.apache.org/jira/browse/SLING-2268
> Project: Sling
> Issue Type: Bug
> Components: Servlets
> Affects Versions: Servlets Get 2.1.2
> Reporter: Honwai Wong
> Priority: Minor
> Attachments: SLING-2268-asanso-patch.txt
>
>
> A request to a resource with a trailing slash and an extension properly resolves to the correct resource and resource-type. From my point of view, such a request looks rather incorrect and shouldn't get served in the first place, e.g. returning a 404 response:
> http://<host>:<port>/resourcexyz/.html
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (SLING-2268) Request to resource xyz/.html
resolves to xyz
Posted by "Antonio Sanso (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-2268?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Antonio Sanso updated SLING-2268:
---------------------------------
Attachment: SLING-2268-asanso-patch.txt
should you agree with the bug report I have attached a proposed patch + additional unit test
> Request to resource xyz/.html resolves to xyz
> ---------------------------------------------
>
> Key: SLING-2268
> URL: https://issues.apache.org/jira/browse/SLING-2268
> Project: Sling
> Issue Type: Bug
> Components: Servlets
> Affects Versions: Servlets Get 2.1.2
> Reporter: Honwai Wong
> Priority: Minor
> Attachments: SLING-2268-asanso-patch.txt
>
>
> A request to a resource with a trailing slash and an extension properly resolves to the correct resource and resource-type. From my point of view, such a request looks rather incorrect and shouldn't get served in the first place, e.g. returning a 404 response:
> http://<host>:<port>/resourcexyz/.html
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (SLING-2268) Request to resource xyz/.html
resolves to xyz
Posted by "Rajesh P (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-2268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13271808#comment-13271808 ]
Rajesh P commented on SLING-2268:
---------------------------------
I too agree that /resourcexyz/.html should not be redirect to /resourcexyz/ and should rather give http 404. But looking at your patch, I feel that you should change your isWrongTrailingSlashRequest() function to use regular expressions for matching if the url contains a "." after a "/", rather than looping through the characters.
> Request to resource xyz/.html resolves to xyz
> ---------------------------------------------
>
> Key: SLING-2268
> URL: https://issues.apache.org/jira/browse/SLING-2268
> Project: Sling
> Issue Type: Bug
> Components: Servlets
> Affects Versions: Servlets Get 2.1.2
> Reporter: Honwai Wong
> Priority: Minor
> Attachments: SLING-2268-asanso-patch.txt
>
>
> A request to a resource with a trailing slash and an extension properly resolves to the correct resource and resource-type. From my point of view, such a request looks rather incorrect and shouldn't get served in the first place, e.g. returning a 404 response:
> http://<host>:<port>/resourcexyz/.html
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira