path parameters in WAUrl?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

path parameters in WAUrl?

Philippe Marschall
Hi

I have a case where I need to pass the session id as a path parameter
[1] to a load balancer. The URL would when look something like this

/examples/counter;_s=sessionId?_k=.... (&_s=sessionId might follow
doesn't matter)
(not that this must not be percent escaped)

As this is a really rare case I thought about adding a lazily
initialized SmallDictionary to WAUrl that would map the path index to
the parameter values. Opinions?

And yes, it will make for a cool demo ;-)

 [1] http://doriantaylor.com/policy/http-url-path-parameter-syntax

Cheers
Philippe
_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
Reply | Threaded
Open this post in threaded view
|

Re: path parameters in WAUrl?

Julian Fitzell-2
Do you mean in the actual Seaside released package or just in your application?

Also, I'm not clear what you mean by "map the path index to the parameter values"...

On Mon, Jul 4, 2011 at 9:19 PM, Philippe Marschall <[hidden email]> wrote:
Hi

I have a case where I need to pass the session id as a path parameter
[1] to a load balancer. The URL would when look something like this

/examples/counter;_s=sessionId?_k=.... (&_s=sessionId might follow
doesn't matter)
(not that this must not be percent escaped)

As this is a really rare case I thought about adding a lazily
initialized SmallDictionary to WAUrl that would map the path index to
the parameter values. Opinions?

And yes, it will make for a cool demo ;-)

 [1] http://doriantaylor.com/policy/http-url-path-parameter-syntax

Cheers
Philippe
_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev


_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
Reply | Threaded
Open this post in threaded view
|

Re: path parameters in WAUrl?

Philippe Marschall
2011/7/5 Julian Fitzell <[hidden email]>:
> Do you mean in the actual Seaside released package or just in your
> application?

The "trunk" code base.

> Also, I'm not clear what you mean by "map the path index to the parameter
> values"...

Give the URL /examples/counter;_s=sessionId

 1 -> nil (missing association)
 2 -> {_s: sessionId}

It also has the slight advantage that it doesn't have to be repeated
as a hidden field in the form but I don't think we want to change
this.

Cheers
Philippe
_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
Reply | Threaded
Open this post in threaded view
|

Re: path parameters in WAUrl?

Julian Fitzell-2
Hmm... I haven't actually gone and looked at the code, but conceptually I'm not totally convinced that should be part of WAUrl (after all, people could use many syntax forms within path segments). As you said, the spec says nothing about the meaning of the path; would it be more logical to have something you can use to parse/generate such URLs?

Julian

On Tue, Jul 5, 2011 at 6:09 AM, Philippe Marschall <[hidden email]> wrote:
2011/7/5 Julian Fitzell <[hidden email]>:
> Do you mean in the actual Seaside released package or just in your
> application?

The "trunk" code base.

> Also, I'm not clear what you mean by "map the path index to the parameter
> values"...

Give the URL /examples/counter;_s=sessionId

 1 -> nil (missing association)
 2 -> {_s: sessionId}

It also has the slight advantage that it doesn't have to be repeated
as a hidden field in the form but I don't think we want to change
this.

Cheers
Philippe
_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev


_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
Reply | Threaded
Open this post in threaded view
|

Re: path parameters in WAUrl?

Philippe Marschall
2011/7/8 Julian Fitzell <[hidden email]>:
> Hmm... I haven't actually gone and looked at the code, but conceptually I'm
> not totally convinced that should be part of WAUrl (after all, people could
> use many syntax forms within path segments).

If it's not part of WAUrl then it gets quite hard to support this. It
gets passed to the application as part of the request URL, it get
rendered on the document as part of the actions URL.

> As you said, the spec says
> nothing about the meaning of the path;

The spec explicitly mentions that applications (can) do that.

> would it be more logical to have
> something you can use to parse/generate such URLs?

IMHO it would be logical to have in in WAUrl.

Cheers
Philippe
_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
Reply | Threaded
Open this post in threaded view
|

Re: path parameters in WAUrl?

Julian Fitzell-2
<shrug> Ok, as you wish. :)

On Fri, Jul 8, 2011 at 11:15 AM, Philippe Marschall <[hidden email]> wrote:
2011/7/8 Julian Fitzell <[hidden email]>:
> Hmm... I haven't actually gone and looked at the code, but conceptually I'm
> not totally convinced that should be part of WAUrl (after all, people could
> use many syntax forms within path segments).

If it's not part of WAUrl then it gets quite hard to support this. It
gets passed to the application as part of the request URL, it get
rendered on the document as part of the actions URL.

> As you said, the spec says
> nothing about the meaning of the path;

The spec explicitly mentions that applications (can) do that.

> would it be more logical to have
> something you can use to parse/generate such URLs?

IMHO it would be logical to have in in WAUrl.

Cheers
Philippe
_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev


_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev
Reply | Threaded
Open this post in threaded view
|

Re: path parameters in WAUrl?

Philippe Marschall
2011/7/8 Julian Fitzell <[hidden email]>:
> <shrug> Ok, as you wish. :)

Thanks, it will make for a really cool demo :-)

Cheers
Philippe
_______________________________________________
seaside-dev mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/seaside-dev