Help on the request object in mod_wxjs

0 views
Skip to first unread message

jeffwad

unread,
Sep 6, 2007, 7:08:43 AM9/6/07
to wxJavaScript
Hi,

I have been using mod_wxjs recently and I have a query/ possible bug
report.

The nuts of it is, from the following url:

www.mysite.com/events/gigs/index.wxjs

what should request.pathInfo be?

I was expecting

request.pathInfo === "events/gigs"

but I'm getting an empty string.

If an empty string is indeed the correct behaviour, which property of
the request object should contain the path info of "events/gigs"?

I'm really enjoying hacking about with server side js for web
development, so thank you:)

Cheers

Si

franky...@gmail.com

unread,
Sep 6, 2007, 7:37:20 AM9/6/07
to wxJavaScript

On 6 sep, 13:08, jeffwad <jeff...@gmail.com> wrote:
> Hi,
>
> I have been using mod_wxjs recently and I have a query/ possible bug
> report.
>
> The nuts of it is, from the following url:
>
> www.mysite.com/events/gigs/index.wxjs
>
> what should request.pathInfo be?
>
> I was expecting
>
> request.pathInfo === "events/gigs"
>
> but I'm getting an empty string.
>
> If an empty string is indeed the correct behaviour, which property of
> the request object should contain the path info of "events/gigs"?
>

The empty string is indeed the correct behaviour. pathInfo is
everything that follows the filename:

www.mysite.com/events/gigs/index.wxjs/a/b/c

would result in a/b/c in pathInfo

Try request.filename to get the information you want.
When this doesn't work, please let me know, I can always add some more
variables.

Franky.

jeffwad

unread,
Sep 6, 2007, 8:35:41 AM9/6/07
to wxJavaScript
Hi Franky,

Thanks for your quick response.

request.filename does return the location of the file.

Unfortunately I'm redirecting everything through one page using
mod_redirect, so the location returned is that of the redirected file,
not the the path in the url.

I have tried all the documented properties of the request object and
not been able to access the data needed.

If you could add this property to the request object I'd really
appreciate it.

Cheers

Si

Franky Braem

unread,
Sep 6, 2007, 4:40:48 PM9/6/07
to wxjava...@googlegroups.com
I've added several new properties to the HttpRequest object. If you can,
you can get it from the subversion repository.

Franky

jeffwad

unread,
Sep 13, 2007, 10:53:24 AM9/13/07
to wxJavaScript
Hi Franky,

Thanks for doing this. I'll test it when I get the chance.

Si

> FrankyI

Reply all
Reply to author
Forward
0 new messages