Mailing List Archive

%fdat oddities
Hi all,

is it possible for %fdat to accumulate parameters passed thru POST and GET
methods at the same time?
Example:

i have a mod_rewrite rule, like that:

RewriteEngine on
RewriteRule ^/([0-9a-fA-F]+)/(.*)$ /$2?sid=$1 [L,PT,NS,QSA]

That way, an url in the form http://blah.tld/223453af23/blah.epl?test=blah
gets translated to http://blah.tld/blah.epl?session=223453af23&test=blah.

i have an embperl page calling another embperl page, with the parameters
passed through FORM METHOD="POST". when the method is POST, the sid from
the rewrite rule is ignored, when it is GET - it works...
the question is - is there a way that the above will work when the
method is POST, in other words is there a way to mix both POST and GET
parameters in one page at the same time?

i am not using %udat, because i don't want cookies, rather i'd do
the session handling myself, so I can stick it in the url;-)

excuse my english, it is not my native language;-)

TIA,
-tacho

--
[i don't follow] | [http://daemonz.org/ || tacho@daemonz.org]
[.everything should be made as simple as possible, but no simpler]
0x44FC3339 || [02B5 798B 4BD1 97FB F8DB 72E4 DCA4 BE03 44FC 3339]
Re: %fdat oddities [ In reply to ]
This works -> put the session into ENVIRONMENT variable

RewriteEngine on
RewriteRule ^(.*)/([0123456789]+)/([0123456789]+)/(.*) $1/$4 [E=UID:$2,E=SID:$3]

On Wed, 19 Jul 2000, you wrote:
> Hi all,
>
> is it possible for %fdat to accumulate parameters passed thru POST and GET
> methods at the same time?
> Example:
>
> i have a mod_rewrite rule, like that:
>
> RewriteEngine on
> RewriteRule ^/([0-9a-fA-F]+)/(.*)$ /$2?sid=$1 [L,PT,NS,QSA]
>
> That way, an url in the form http://blah.tld/223453af23/blah.epl?test=blah
> gets translated to http://blah.tld/blah.epl?session=223453af23&test=blah.
>
> i have an embperl page calling another embperl page, with the parameters
> passed through FORM METHOD="POST". when the method is POST, the sid from
> the rewrite rule is ignored, when it is GET - it works...
> the question is - is there a way that the above will work when the
> method is POST, in other words is there a way to mix both POST and GET
> parameters in one page at the same time?
>
> i am not using %udat, because i don't want cookies, rather i'd do
> the session handling myself, so I can stick it in the url;-)
>
> excuse my english, it is not my native language;-)
>
> TIA,
> -tacho
>
> --
> [i don't follow] | [http://daemonz.org/ || tacho@daemonz.org]
> [.everything should be made as simple as possible, but no simpler]
> 0x44FC3339 || [02B5 798B 4BD1 97FB F8DB 72E4 DCA4 BE03 44FC 3339]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
> For additional commands, e-mail: embperl-help@perl.apache.org
--
Dimitar Peikov
Programmer
"We Build e-Business"

RILA Solutions
27 Building, Acad.G.Bonchev Str.
1113 Sofia, Bulgaria
home: (+359 2) 595495
phone: (+359 2) 9797320
phone: (+359 2) 9797300
fax: (+359 2) 9733355
http://www.rila.com
Re: %fdat oddities [ In reply to ]
On Wed, Jul 19, 2000 at 05:26:18PM +0300, Dimitar Peikov wrote:
> This works -> put the session into ENVIRONMENT variable
>
> RewriteEngine on
> RewriteRule ^(.*)/([0123456789]+)/([0123456789]+)/(.*) $1/$4 [E=UID:$2,E=SID:$3]
>

yes, i have thought of that, and it indeed works, but I would like to
pass it through the GET interface, if at all possible. if it turns out
impossible - then my choice would be a RewriteRule similar to yours above...
anyway, thanks

-tacho

--
[i don't follow] | [http://daemonz.org/ || tacho@daemonz.org]
[.everything should be made as simple as possible, but no simpler]
0x44FC3339 || [02B5 798B 4BD1 97FB F8DB 72E4 DCA4 BE03 44FC 3339]
Re: %fdat oddities [ In reply to ]
>> This works -> put the session into ENVIRONMENT variable
>>
>
>yes, i have thought of that, and it indeed works, but I would like to
>pass it through the GET interface, if at all possible. if it turns out
>impossible - then my choice would be a RewriteRule similar to yours
above...


Currently Embperl cannot join the values from POST and GET together (it's on
the TODO list). On a POST request you see only the posted data in %fdat.
Either do something like

$ENV{QUERY_STRING} =~ /session=(.*?)(&|$)/ ;

to get your session info directly out of the query_info or use the solution
with putting session info in an evironment variable

Gerald