DO NOT REPLY [Bug 32762] - [PATCH] flow redirector should allow explicit 'cocoon:' scheme

2005-10-21 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32762





--- Additional Comments From [EMAIL PROTECTED]  2005-10-21 18:21 ---
It's not really "complicated URL-checking machinery" :-).  We currently check 
to see if the URL contains 
a colon, and all my patch does is to skip that check if the URL starts with 
"cocoon:/".

Your suggestion is similar to Jörg's in Comment #4, and the reason IMHO it is 
not good is because the 
newbie who doesn't understand cocoon.sendPage() will try to use it for an 
external redirect, and will get 
a less-than-helpful error message, e.g. "Resource Not Found: 
cocoon:/http://foobar";.  My patch 
preserves the current check and helpful error message.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.


DO NOT REPLY [Bug 32762] - [PATCH] flow redirector should allow explicit 'cocoon:' scheme

2005-10-21 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32762





--- Additional Comments From [EMAIL PROTECTED]  2005-10-21 18:04 ---
Sylvain wrote (on dev@cocoon.apache.org):

IMO we don't even need complicated URL-scheme checking machinery, as by 
definition 
cocoon.sendPage() calls a pipeline, which translates to redirecting to a 
"cocoon:" URL.

So we may (but why?) want to allow people to explicitely write the full URL in 
their flowscript, but then 
we just have to check if the given URL starts with "cocoon:/" to avoid 
prepending the prefix twice.

So the code would simply be:
 forwardTo(String uri...) {
   if (!uri.startsWith("cocoon:/")) {
   uri = "cocoon:/" + uri;
   }
   etc...

Thoughts?

Sylvain


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.


DO NOT REPLY [Bug 32762] - [PATCH] flow redirector should allow explicit 'cocoon:' scheme

2005-10-20 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32762





--- Additional Comments From [EMAIL PROTECTED]  2005-10-20 20:47 ---
OK, finally got around to submitting a better patch per my comment #3.

I'd really like to see this make it into 2.1.8, if at all possible.

To summarize, this patch (a) allows perfectly valid URIs such as 
"cocoon:/blah/blah/blah:SOURCE" to 
work (that's the purpose of the patch); (b) doesn't break anything, i.e., if 
there is no ':' in the URI then 
we still prepend "cocoon:" as the scheme;  and (c) preserves meaningful error 
message if the user tries 
to redirect to a URI with an explicit scheme other than "cocoon:/".

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.


DO NOT REPLY [Bug 32762] - [PATCH] flow redirector should allow explicit 'cocoon:' scheme

2005-10-20 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32762





--- Additional Comments From [EMAIL PROTECTED]  2005-10-20 20:42 ---
Created an attachment (id=16767)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=16767&action=view)
patch against BRANCH_2_1_X, rev. 326964


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.


DO NOT REPLY [Bug 32762] - [PATCH] flow redirector should allow explicit 'cocoon:' scheme

2005-10-20 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32762


[EMAIL PROTECTED] changed:

   What|Removed |Added

  Attachment #13777|0   |1
is obsolete||




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.


DO NOT REPLY [Bug 32762] - [PATCH] flow redirector should allow explicit 'cocoon:' scheme

2005-09-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32762





--- Additional Comments From [EMAIL PROTECTED]  2005-09-19 07:16 ---
My thoughts were: Either a colon is allowed or not - independent in which form.
Prepending it with 'cocoon:/' is another point. But yes, this removes a check.
As I don't want to decide this by myself I guess it is better to ask the list
for a correct handling and so a community decision.

Jörg

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.


DO NOT REPLY [Bug 32762] - [PATCH] flow redirector should allow explicit 'cocoon:' scheme

2005-09-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32762





--- Additional Comments From [EMAIL PROTECTED]  2005-09-19 01:07 ---
OK, if I understand you correctly, you're saying that if it's not good enough 
to just check for a colon, 
then we should just bung a 'cocoon:/' onto the front, and let any resulting 
error happen downstream?  
E.g., 

  Resource Not Found: cocoon:/http://whatever

What I was trying to do was preserve the error here that says "hey, the flow 
redirector takes 'cocoon:/' 
only" -- except now either by default or explicitly instead of implicit-only.  
Why do you want to throw 
out this check?  I mean it would be fine for me personally I guess :-), but the 
downside is that we 
exchange an error message that told people what was wrong and why, with one 
that makes it look (to 
the initiate) like Cocoon is broken ("why is it prepending 'cocoon:/' onto my 
URI, that's not what I 
want!?!").

The other downside of course is that the implicit 'cocoon:/' makes some URIs 
_look_ like something 
totally different than what they are.  For example,

  cocoon:/foo:/something

is a valid URI, but the 'unconditional implicit scheme' approach forces the 
user to write that as

  foo:/something

which makes it look like the scheme is 'foo'.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.


DO NOT REPLY [Bug 32762] - [PATCH] flow redirector should allow explicit 'cocoon:' scheme

2005-09-18 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32762





--- Additional Comments From [EMAIL PROTECTED]  2005-09-18 16:45 ---
But please not in the way your first patch worked. IMO it is sufficient to just
not throw an exception in case of a colon - if it is a valid character for a
URI. This means we just prepend the uri with "cocoon:/" and let the source
resolver do the rest.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.


DO NOT REPLY [Bug 32762] - [PATCH] flow redirector should allow explicit 'cocoon:' scheme

2005-09-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32762





--- Additional Comments From [EMAIL PROTECTED]  2005-09-17 22:50 ---
The colon is a valid character in a  URI after the scheme, where it has no 
special meaning.  Being able to 
use it there just makes for  more flexibility in naming schemes (I like to use 
it for various internal 
pipelines, etc.).  I shouldn't need to have any special use case to justify it, 
any more than I should need 
a special use case for using the letter 'Q' in a URI :-)

If it was decided to only support the implicit scheme here, then obviously that 
is because nobody 
thought of the fact that an explicit scheme is the only way to generally allow 
':' elsewhere in the URI.  
Since you don't often see ':' in a URI after the scheme, the oversight is 
understandable :-).

But, looking at my patch, I wonder why I used an RE for this, that seems 
retarded.  I must have thought 
I was going to need an RE for some other reason (a substitution?) and then 
didn't, but didn't recode it to 
just use String'startsWith() instead.  I'll provide a revised patch.



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.


DO NOT REPLY [Bug 32762] - [PATCH] flow redirector should allow explicit 'cocoon:' scheme

2005-09-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32762





--- Additional Comments From [EMAIL PROTECTED]  2005-09-17 18:31 ---
It was explicitely decided to implicit use cocoon: scheme. What's your use case
for ""cocoon:/something:foo/bar"?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.


DO NOT REPLY [Bug 32762] - [PATCH] flow redirector should allow explicit 'cocoon:' scheme

2004-12-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32762


[EMAIL PROTECTED] changed:

   What|Removed |Added

   Severity|normal  |minor




-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.


DO NOT REPLY [Bug 32762] - [PATCH] flow redirector should allow explicit 'cocoon:' scheme

2004-12-17 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32762





--- Additional Comments From [EMAIL PROTECTED]  2004-12-18 03:14 ---
Created an attachment (id=13777)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=13777&action=view)
patch against SVN BRANCH_2_1_X


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are the assignee for the bug, or are watching the assignee.