Fix whitespace problems with POD in Session/Response
This commit is contained in:
parent
94928825f2
commit
94761c46e4
1 changed files with 44 additions and 44 deletions
|
|
@ -77,7 +77,7 @@ sub sendHeader {
|
|||
my ($request, $config) = $session->quick(qw(request config ));
|
||||
return undef unless $request;
|
||||
my $userId = $session->get("userId");
|
||||
|
||||
|
||||
# send webgui session cookie
|
||||
my $cookieName = $config->getCookieName;
|
||||
$self->setCookie($cookieName, $session->getId, $config->getCookieTTL, $config->get("cookieDomain")) unless $session->getId eq $request->cookies->{$cookieName};
|
||||
|
|
@ -132,28 +132,28 @@ sub _sendMinimalHeader {
|
|||
#
|
||||
|
||||
=head2 setCookie ( name, value [ , timeToLive, domain ] )
|
||||
|
||||
|
||||
Sends a cookie to the browser.
|
||||
|
||||
|
||||
=head3 name
|
||||
|
||||
|
||||
The name of the cookie to set. Must be unique from all other cookies from this domain or it will overwrite that cookie.
|
||||
|
||||
|
||||
=head3 value
|
||||
|
||||
|
||||
The value to set.
|
||||
|
||||
|
||||
=head3 timeToLive
|
||||
|
||||
|
||||
The time that the cookie should remain in the browser. Defaults to "+10y" (10 years from now).
|
||||
This may be "session" to indicate that the cookie is for the current browser session only.
|
||||
|
||||
|
||||
=head3 domain
|
||||
|
||||
|
||||
Explicitly set the domain for this cookie.
|
||||
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
sub setCookie {
|
||||
my $self = shift;
|
||||
my $name = shift;
|
||||
|
|
@ -161,7 +161,7 @@ sub setCookie {
|
|||
my $ttl = shift;
|
||||
my $domain = shift;
|
||||
$ttl = (defined $ttl ? $ttl : '+10y');
|
||||
|
||||
|
||||
$self->cookies->{$name} = {
|
||||
value => $value,
|
||||
path => '/',
|
||||
|
|
@ -206,11 +206,11 @@ sub setRedirect {
|
|||
#
|
||||
|
||||
=head2 getLastModified ( )
|
||||
|
||||
|
||||
Returns the stored epoch date when the page as last modified.
|
||||
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
sub getLastModified {
|
||||
my $self = shift;
|
||||
return $self->{_http}{lastModified};
|
||||
|
|
@ -219,15 +219,15 @@ sub getLastModified {
|
|||
#
|
||||
#
|
||||
#
|
||||
|
||||
|
||||
=head2 setLastModified ( epoch )
|
||||
|
||||
|
||||
=head3 epoch
|
||||
|
||||
|
||||
The epoch date when the page was last modified.
|
||||
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
sub setLastModified {
|
||||
my $self = shift;
|
||||
my $epoch = shift;
|
||||
|
|
@ -237,13 +237,13 @@ sub setLastModified {
|
|||
#
|
||||
#
|
||||
#
|
||||
|
||||
|
||||
=head2 getNoHeader ( )
|
||||
|
||||
|
||||
Returns whether or not a HTTP header will be printed.
|
||||
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
sub getNoHeader {
|
||||
my $self = shift;
|
||||
return $self->{_http}{noHeader};
|
||||
|
|
@ -252,18 +252,18 @@ sub getNoHeader {
|
|||
#
|
||||
#
|
||||
#
|
||||
|
||||
|
||||
=head2 setNoHeader ( boolean )
|
||||
|
||||
|
||||
Disables the printing of a HTTP header. Useful in situations when content is not
|
||||
returned to a browser (export to disk for example).
|
||||
|
||||
|
||||
=head3 boolean
|
||||
|
||||
|
||||
Any value other than 0 will disable header printing.
|
||||
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
sub setNoHeader {
|
||||
my $self = shift;
|
||||
$self->{_http}{noHeader} = shift;
|
||||
|
|
@ -272,13 +272,13 @@ sub setNoHeader {
|
|||
#
|
||||
#
|
||||
#
|
||||
|
||||
|
||||
=head2 isRedirect ( )
|
||||
|
||||
|
||||
Returns a boolean value indicating whether the current page will redirect to some other location.
|
||||
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
sub isRedirect {
|
||||
my $self = shift;
|
||||
my $status = $self->status;
|
||||
|
|
@ -290,11 +290,11 @@ sub isRedirect {
|
|||
#
|
||||
|
||||
=head2 getStreamedFile ( ) {
|
||||
|
||||
|
||||
Returns the location of a file to be streamed thru mod_perl, if one has been set.
|
||||
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
sub getStreamedFile {
|
||||
my $self = shift;
|
||||
return $self->{_http}{streamlocation} || undef;
|
||||
|
|
@ -303,9 +303,9 @@ sub getStreamedFile {
|
|||
#
|
||||
#
|
||||
#
|
||||
|
||||
|
||||
=head2 setStreamedFile ( ) {
|
||||
|
||||
|
||||
Set a file to be streamed through mod_perl.
|
||||
Rrequires that C<enableStreamingUploads> be set in the config file and then
|
||||
some middleware or reverse-proxy in front of L<WebGUI> to catch the X-Sendfile
|
||||
|
|
@ -353,7 +353,7 @@ If C<enableStreamingUploads> is set in the config file, C<setStreamedFile()> is
|
|||
|
||||
# $session->response->sendFile($self->getStorageLocation, $self->filename);
|
||||
|
||||
|
||||
|
||||
sub sendFile {
|
||||
my $self = shift;
|
||||
my $storage = shift;
|
||||
|
|
@ -378,15 +378,15 @@ Sets the cache control headers.
|
|||
=head3 timeout
|
||||
|
||||
Either the number of seconds until the cache expires, or the word "none" to disable cache completely for this request.
|
||||
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
sub setCacheControl {
|
||||
my $self = shift;
|
||||
my $timeout = shift;
|
||||
$self->{_http}{cacheControl} = $timeout;
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
#
|
||||
#
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue