AxKit-XSP-WebUtils
view release on metacpan or search on metacpan
WebUtils.pm view on Meta::CPAN
<web:redirect secure="yes">
<web:uri><param:goto/></web:uri>
</web:redirect>
=head2 C<<web:url_encode string="..."/>>
Encode the string using URL encoding according to the URI specification.
=head2 C<<web:url_decode string="..."/>>
Decode the URL encoded string.
=head2 C<<web:header>>
This tag allows you to get and set HTTP headers.
Parameters:
=over 4
=item name (required)
The name of the parameter. If only name is specified, you will B<get>
the value of the incoming HTTP header of the given name.
=item value (optional)
If you also specify a value parameter, then the tag will B<set> the
outgoing HTTP header to the given value.
=back
Example:
<p>
Your browser is: <web:header name="HTTP_USER_AGENT"/>
</p>
=head2 C<<web:return_code/>>
This tag allows you to set the reply status for the client request.
Parameters:
=over 4
=item code (required)
The integer value of a valid HTTP status code.
=back
=head2 C<<web:username/>>
Returns the name of the authenticated user.
=head2 C<<web:password/>>
If the current request is protected by Basic authentication, this tag
will return the decoded password sent by the client.
=head2 C<<web:request_parsed_uri>>
This tag allows you to get the fully parsed URI for the current request.
In contrast to <web:request_uri/> the parsed URI will always include things like
scheme, hostname, or the querystring.
Parameters:
=over 4
=item omit (optional)
Valid values: B<path>, B<path_info>, and B<query>.
If specified, the corresponding URL components will be ommited for the return value.
=back
=head2 C<<web:request_prev_parsed_uri>>
This tag allows you to get the fully parsed URI for the previous request. This can be useful
in 403 error documents where it is required to post login information back to the originally
requested URI.
Parameters:
=over 4
=item omit (optional)
Valid values: B<path>, B<path_info>, and B<query>.
If specified, the corresponding URL components will be ommited for the return value.
=back
Example:
<p>Access Denied. Please login</p>
<form method="post" name="login">
<xsp:attribute name="action">
<web:request_prev_parsed_uri omit="query"/>
</xsp:attribute>
...
=head2 C<<web:request_prev_uri/>>
Returns the URI of the previous request minus optional query string
=head2 C<<web:request_prev_query_string/>>
Returns the query string of the previous request.
=head2 C<<web:request_prev_param name="...">>
Returns the value of the requested CGI parameter of the previous request.
Parameters:
=over 4
( run in 0.914 second using v1.01-cache-2.11-cpan-ba708fea25c )