Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#45 Apache::Request control de HTTP params

closed
Chris Nandor
5
2002-09-09
2001-05-28
No

This patch modifies the way slashcode 2.0.0 handle the
params received from the HTML Forms. The actual way
doesn't permit to have multivalue params or
ENCTYPE="multipart/form-data" forms.

The changes are minimal and this way is closer to the
way slashcode 1.0 do the work in a better way in my own
opinion.

Also, in the from HASH is stored also a pointer to the
Apache::Request created with the request from the user
so you can access it and use the Apache::Request
interface which is powerfull and simple from your
plugins.

If you have any doubt about the patch, please contact
me at acs@barrapunto.com. You have to patch two files:

Slash/Utility.pm
Slash/Apache/User.pm

Discussion

1 2 > >> (Page 1 of 2)
  • Targz file with the two patches

     
    Attachments
  • Logged In: YES
    user_id=85578

    Ops, this is not the correct way to go! We can't modify
    filter_params because is used in other places. The best way
    is to modify the way things are done in Slash::Apache::User.
    Please, use the file attached in this comment if you want to
    test it.

     
  • Chris Nandor
    Chris Nandor
    2001-06-25

    Logged In: YES
    user_id=3660

    Hi,

    Do you still need to have some of the changes in filter_params? I am not
    sure how this will make a difference otherwise. Don't you still need the
    %multivalue hash etc.?

     
  • Chris Nandor
    Chris Nandor
    2001-06-25

    • assigned_to: nobody --> pudge
     
  • Logged In: YES
    user_id=85578

    After some heavy testing I have discover that the current
    patch fails with multivalue params in a very obscure way. I
    have attached another patch that works correctly.

     
  • Logged In: YES
    user_id=85578

    New version which correct a problem in the way multi value
    params are managed. And also include the patch to
    Slash::Utility to support into
    filter_params multivalue params.

     
  • Tar gz with the two patches

     
    Attachments
  • Chris Nandor
    Chris Nandor
    2001-06-27

    Logged In: YES
    user_id=3660

    OK, why do "my $apr = Apache::Request->new($r)" instead of just using
    $r itself?

    Also, "my $apr = $params{query_apache};" should probably be "my $apr
    = delete $params{query_apache};" so we don't treat it as a parameter,
    right? And what is the purpose of "$form->{query_apache} = $apr;"?
    Do we plan on using $apr again later?

    Thanks,

     
  • Chris Nandor
    Chris Nandor
    2002-09-09

    Logged In: YES
    user_id=3660

    This shouldn't be necessary anymore. We do support multiple
    parameters now.

     
1 2 > >> (Page 1 of 2)