DTA-CAB

 view release on metacpan or  search on metacpan

CAB/Client/HTTP.pm  view on Meta::CPAN

	      ($opts ? %$opts : qw()),
	      a=>$aname,
	     );

  ##-- sanity checks (long parameter names clobber short names)
  #$form{enc} = $form{encoding} if ($form{encoding});
  $form{fmt} = $form{format} if ($form{format});
  delete(@form{qw(format encoding qraw headers cacheGet cacheSet)});
  delete(@form{grep {!defined($form{$_})} keys %form});

  ##-- content-type hacks
  my $ctype = $opts->{contentType};
  $ctype = 'application/octet-stream' if (!$ctype);
  delete(@form{qw(q qd contentType)});

  ##-- compatibility check / raw vs. formatted
  my $qname = $opts->{qraw} ? 'q' : 'qd';
  my $qmode = $cli->{mode};
  if ($qname eq 'q' && $cli->{mode} eq 'xpost') {
    $cli->logcarp("analyzeDataRef(): 'xpost' method not supported for raw queries; using 'post' instead");
    $qmode = 'post';

CAB/Server/HTTP/Handler/CGI.pm  view on Meta::CPAN

  my ($h,$hreq) = @_;
  if ($hreq->uri =~ m/\?(.*)$/) {
    ##-- see also: $hreq->uri->query_form(), also URI::QueryParam
    return scalar(CGI->new($1)->Vars);
  }
  return {};
}

## \%params = $h->contentParams($hreq,%opts)
##  + gets POST-style content parameters from $hreq
##  + if content-type is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data',
##    but content is present, returns $hreq
##  + %opts:
##      defaultName => $name,       ##-- default parameter name (default='POSTDATA')
##      #defaultCharset => $charset, ##-- default charset (always UTF-8)
sub contentParams {
  my ($h,$hreq,%opts) = @_;
  my $dkey = defined($opts{defaultName}) ? $opts{defaultName} : 'POSTDATA';
  #my $denc = defined($opts{defaultCharset}) ? $opts{defaultCharset} : $h->requestEncoding($hreq);
  if ($hreq->content_type eq 'application/x-www-form-urlencoded') {
    ##-- x-www-form-urlencoded

CAB/Server/HTTP/Handler/CGI.pm  view on Meta::CPAN


 \%params = $h->uriParams($hreq,%opts)

Parses GET-style form parameters from $hreq-E<gt>uri.

=item contentParams

 \%params = $h->contentParams($hreq,%opts);

Parses POST-style content parameters from $hreq.
If $hreq content-type is neither 'application/x-www-form-urlencoded' nor 'multipart/form-data',
but content is present, returns $hreq content as the value of the pseudo-variable $opts{defaultName}.
Known %opts:

 defaultName => $name,       ##-- default parameter name (default='POSTDATA')
 defaultCharset => $charset, ##-- default charset

=item params

 \%params = $h->params($hreq,%opts);

Changes  view on Meta::CPAN

v1.76 2016-06-09  moocow
	* fixes and tweaks for en-wsj (english)
	* added Morph/Helsinki.pm
	  - TAGH-simulation postprocessing for Helsinki-style morphological transducers

v1.75 2016-04-29  moocow
	* updated cab howto for new server limit: 512KB -> 1MB
	* updated WebServiceHowto: added screenshot
	* pass error response through apache cgi wrappers
	* more error tweak attempts
	* fixed content-type: html for new error messages
	* improved error reporting in Server::HTTP::clientError(), Server::HTTP::Handler::cerror()
	  - generate generic error responses and send them using
	    HTTP::Daemon::ClientConn send_response() method rather than its
	    send_error() method, since the latter generates html markup
	    without root element (may be a problem for weblicht)
	  - see mantis bug #12941
	* http handler tweaks
	* cab-http.plm: maxRequestSize 512KB -> 1MB

v1.74 2016-02-12  moocow



( run in 3.064 seconds using v1.01-cache-2.11-cpan-524268b4103 )