Forms will show type of programming language unless..

Fix it!!

Postby malmklang » Tue Mar 13, 2007 11:19 am

I can try a php formmail thingie, just to see what happens.
I'll report back ;)
malmklang
 
Posts: 17
Joined: Mon Mar 12, 2007 6:54 am

Postby malmklang » Wed Mar 14, 2007 3:52 am

Tried a php guestbook, and what the hey, that worked like it should. But I can't see why my script doesn't work as well. Only thing I can think of now is that apache handles perl's post differently than php's post. Or something.... Getting frustrated here :P
malmklang
 
Posts: 17
Joined: Mon Mar 12, 2007 6:54 am

Postby richardk » Wed Mar 14, 2007 8:52 am

It's possibly because of the CGI. If you dump all variables set by the server maybe you'll find something you can use to get it (like raw post data).
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby malmklang » Thu Mar 15, 2007 12:39 pm

Don't exactly know how to go about doing that, I'm afraid.
malmklang
 
Posts: 17
Joined: Mon Mar 12, 2007 6:54 am

Postby malmklang » Thu Mar 15, 2007 5:59 pm

Tried a header spy addon to firefox, and it showed that the method is post but the response is get. don't know what to do to make apache understand that post is POST.
malmklang
 
Posts: 17
Joined: Mon Mar 12, 2007 6:54 am

Postby richardk » Fri Mar 16, 2007 1:25 pm

it showed that the method is post but the response is get.

Responses don't have a method. And you can't see what happens between the rewrite and CGI/PERL, it's internal.

What does PERL's ENV REQUEST_METHOD variable say?

don't know what to do to make apache understand that post is POST.

I doubt it's Apache, because PHP understands it. You should probably ask some people who know PERL.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby malmklang » Fri Mar 16, 2007 3:47 pm

I ment result is GET, not response :P

You mean how I suck in data?
Code: Select all
read(STDIN, $input, $ENV{'CONTENT_LENGTH'});
$input = $ENV{'QUERY_STRING'} if $ENV{'QUERY_STRING'};


Yeah, I should ask perl guys, probably will too, in the end. Thanks for your efforts though, you've been very patient with me and seem to know a lot, a great resource, I see your posts all over the place.
Cudos :)
malmklang
 
Posts: 17
Joined: Mon Mar 12, 2007 6:54 am

Postby richardk » Fri Mar 16, 2007 4:26 pm

Try
Code: Select all
print "Request Method = $ENV{REQUEST_METHOD}\n";


I was thinking you could use/try the CGI module and param() (like Program 4-1 on this page).
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Postby malmklang » Fri Mar 16, 2007 6:59 pm

Life saver you are!! Finally the puzzle was cracked :)
Goes to show that what I suspected was right, I need to refresh my old fashioned way of programming at get with the program, such as using cgi.pm insted of yeah.... you know :P

And you say you're not a perl programmer even? Hot dang, then you must be a God or something :P

One note though: Had to leave the action="..." empty and throw in a hidden field named id="dowhatiwantdamnit" to get it to work. Actually it worked with action="dowhatiwantdamnit" and hidden id="dowhatiwantdamnit" too! :-?

Guess this can be useful for others now, I've seen this question all over the net with no real step by step solution...

Thanks a million once again. I owe you one.
malmklang
 
Posts: 17
Joined: Mon Mar 12, 2007 6:54 am

Previous

Return to Security with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 14 guests

cron