moved uploadsAccessHandler into the main webgui handler mechanism
converted macros to use references fixed some other various bugs
This commit is contained in:
parent
2818ade8b0
commit
ea868a8c0e
73 changed files with 256 additions and 275 deletions
|
|
@ -16,6 +16,7 @@ package WebGUI::HTTP;
|
|||
|
||||
|
||||
use strict;
|
||||
use Apache2::Cookie;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::Style;
|
||||
|
||||
|
|
@ -31,6 +32,7 @@ This package allows the manipulation of HTTP protocol information.
|
|||
|
||||
use WebGUI::HTTP;
|
||||
|
||||
$cookies = WebGUI::HTTP::getCookies();
|
||||
$header = WebGUI::HTTP::getHeader();
|
||||
$mimetype = WebGUI::HTTP::getMimeType();
|
||||
$code = WebGUI::HTTP::getStatus();
|
||||
|
|
@ -50,6 +52,26 @@ These subroutines are available from this package:
|
|||
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getCookies ( )
|
||||
|
||||
Retrieves the cookies from the HTTP header, persists them to the session, and returns a hash reference containing them.
|
||||
|
||||
=cut
|
||||
|
||||
sub getCookies {
|
||||
my %cookies = Apache2::Cookie->fetch();
|
||||
foreach my $key (keys %cookies) {
|
||||
my $value = $cookies{$key};
|
||||
$value =~ s/$key=//; # Strange... The Apache2::Cookie value also contains the key ????
|
||||
# Must be a bug in Apache2::Cookie...
|
||||
$WebGUI::Session::session{cookie}{$key} = $value;
|
||||
}
|
||||
return $WebGUI::Session::session{cookie};
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getHeader ( )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue