亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? protocol.pm

?? 美國CMU大學開發的操作系統健壯性評測軟件
?? PM
字號:
# $Id: Protocol.pm,v 1.1 1999/07/21 19:12:33 kraven Exp $package LWP::Protocol;=head1 NAMELWP::Protocol - Base class for LWP protocols=head1 SYNOPSIS package LWP::Protocol::foo; require LWP::Protocol; @ISA=qw(LWP::Protocol);=head1 DESCRIPTIONThis class is used a the base class for all protocol implementationssupported by the LWP library.When creating an instance of this class usingC<LWP::Protocol::create($url)>, and you get an initialised subclassappropriate for that access method. In other words, theLWP::Protocol::create() function calls the constructor for one of itssubclasses.All derived LWP::Protocol classes need to override the request()method which is used to service a request. The overridden method canmake use of the collect() function to collect together chunks of dataas it is received.The following methods and functions are provided:=over 4=cut#####################################################################require LWP::MemberMixin;@ISA = qw(LWP::MemberMixin);$VERSION = sprintf("%d.%02d", q$Revision: 1.1 $ =~ /(\d+)\.(\d+)/);use strict;use Carp ();use HTTP::Status 'RC_INTERNAL_SERVER_ERROR';require HTML::HeadParser;my %ImplementedBy = (); # scheme => classname=item $prot = new HTTP::Protocol;The LWP::Protocol constructor is inherited by subclasses. As this is avirtual base class this method should B<not> be called directly.=cutsub new{    my($class) = @_;    my $self = bless {	'timeout' => 0,	'parse_head' => 1,    }, $class;    $self;}=item $prot = LWP::Protocol::create($url)Create an object of the class implementing the protocol to handle thegiven scheme. This is a function, not a method. It is more an objectfactory than a constructor. This is the function user agents shoulduse to access protocols.=cutsub create{    my $scheme = shift;    my $impclass = LWP::Protocol::implementor($scheme) or	Carp::croak("Protocol scheme '$scheme' is not supported");    # hand-off to scheme specific implementation sub-class    return $impclass->new($scheme);}=item $class = LWP::Protocol::implementor($scheme, [$class])Get and/or set implementor class for a scheme.  Returns '' if thespecified scheme is not supported.=cutsub implementor{    my($scheme, $impclass) = @_;    if ($impclass) {	$ImplementedBy{$scheme} = $impclass;    }    my $ic = $ImplementedBy{$scheme};    return $ic if $ic;    return '' unless $scheme =~ /^([.+\-\w]+)$/;  # check valid URL schemes    $scheme = $1; # untaint    $scheme =~ s/[.+\-]/_/g;  # make it a legal module name    # scheme not yet known, look for a 'use'd implementation    $ic = "LWP::Protocol::$scheme";  # default location    $ic = "LWP::Protocol::nntp" if $scheme eq 'news'; #XXX ugly hack    no strict 'refs';    # check we actually have one for the scheme:    unless (defined @{"${ic}::ISA"}) {	# try to autoload it	eval "require $ic";	if ($@) {	    if ($@ =~ /^Can't locate/) { #' #emacs get confused by '		$ic = '';	    } else {		die "$@\n";	    }	}    }    $ImplementedBy{$scheme} = $ic if $ic;    $ic;}=item $prot->request(...) $response = $protocol->request($request, $proxy, undef); $response = $protocol->request($request, $proxy, '/tmp/sss'); $response = $protocol->request($request, $proxy, \&callback, 1024);Dispactches a request over the protocol, and returns a responseobject. This method needs to be overridden in subclasses.  Referer toL<LWP::UserAgent> for description of the arguments.=cutsub request{    my($self, $request, $proxy, $arg, $size, $timeout) = @_;    Carp::croak('LWP::Protocol::request() needs to be overridden in subclasses');}=item $prot->timeout($seconds)Get and set the timeout value in seconds=item $prot->parse_head($yesno)Should we initialize response headers from the <head> section of HTMLdocuments.=cutsub timeout    { shift->_elem('timeout',    @_); }sub parse_head { shift->_elem('parse_head', @_); }sub max_size   { shift->_elem('max_size',   @_); }=item $prot->collect($arg, $response, $collector)Called to collect the content of a request, and process itappropriately into a scalar, file, or by calling a callback.  If $argis undefined, then the content is stored within the $response.  If$arg is a simple scalar, then $arg is interpreted as a file name andthe content is written to this file.  If $arg is a reference to aroutine, then content is passed to this routine.The $collector is a routine that will be called and which isreponsible for returning pieces (as ref to scalar) of the content toprocess.  The $collector signals EOF by returning a reference to anempty sting.The return value from collect() is the $response object reference.B<Note:> We will only use the callback or file argument if$response->is_success().  This avoids sendig content data forredirects and authentization responses to the callback which would beconfusing.=cutsub collect{    my ($self, $arg, $response, $collector) = @_;    my $content;    my($parse_head, $timeout, $max_size) =      @{$self}{qw(parse_head timeout max_size)};    my $parser;    if ($parse_head && $response->content_type eq 'text/html') {	$parser = HTML::HeadParser->new($response->{'_headers'});    }    my $content_size = 0;    if (!defined($arg) || !$response->is_success) {	# scalar	while ($content = &$collector, length $$content) {	    if ($parser) {		$parser->parse($$content) or undef($parser);	    }	    LWP::Debug::debug("read " . length($$content) . " bytes");	    $response->add_content($$content);	    $content_size += length($$content);	    if ($max_size && $content_size > $max_size) {		LWP::Debug::debug("Aborting because size limit exceeded");		my $tot = $response->header("Content-Length") || 0;		$response->header("X-Content-Range", "bytes 0-$content_size/$tot");		last;	    }	}    }    elsif (!ref($arg)) {	# filename	open(OUT, ">$arg") or	    return new HTTP::Response RC_INTERNAL_SERVER_ERROR,			  "Cannot write to '$arg': $!";        binmode(OUT);        local($\) = ""; # ensure standard $OUTPUT_RECORD_SEPARATOR	while ($content = &$collector, length $$content) {	    if ($parser) {		$parser->parse($$content) or undef($parser);	    }	    LWP::Debug::debug("read " . length($$content) . " bytes");	    print OUT $$content;	    $content_size += length($$content);	    if ($max_size && $content_size > $max_size) {		LWP::Debug::debug("Aborting because size limit exceeded");		my $tot = $response->header("Content-Length") || 0;		$response->header("X-Content-Range", "bytes 0-$content_size/$tot");		last;	    }	}	close(OUT);    }    elsif (ref($arg) eq 'CODE') {	# read into callback	while ($content = &$collector, length $$content) {	    if ($parser) {		$parser->parse($$content) or undef($parser);	    }	    LWP::Debug::debug("read " . length($$content) . " bytes");            eval {		&$arg($$content, $response, $self);	    };	    if ($@) {	        chomp($@);		$response->header('X-Died' => $@);		last;	    }	}    }    else {	return new HTTP::Response RC_INTERNAL_SERVER_ERROR,				  "Unexpected collect argument  '$arg'";    }    $response;}=item $prot->collect_once($arg, $response, $content)Can be called when the whole response content is available as$content.  This will invoke collect() with a collector callback thatreturns a reference to $content the first time and an empty string thenext.=cutsub collect_once{    my($self, $arg, $response) = @_;    my $content = \ $_[3];    my $first = 1;    $self->collect($arg, $response, sub {	return $content if $first--;	return \ "";    });}1;=head1 SEE ALSOInspect the F<LWP/Protocol/file.pm> and F<LWP/Protocol/http.pm> filesfor examples of usage.=head1 COPYRIGHTCopyright 1995-1997 Gisle Aas.This library is free software; you can redistribute it and/ormodify it under the same terms as Perl itself.=cut

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美人狂配大交3d怪物一区| 99国产一区二区三精品乱码| 一区二区国产视频| 1024精品合集| 亚洲女与黑人做爰| 亚洲一区二区三区三| 亚洲色图第一区| 一片黄亚洲嫩模| 日韩高清欧美激情| 日日噜噜夜夜狠狠视频欧美人| 午夜精品影院在线观看| 日韩精品欧美精品| 六月婷婷色综合| 国产精品一区二区久久精品爱涩| 国产精品一区不卡| 91美女视频网站| 欧美一区二区在线不卡| 欧美精品一区在线观看| 国产精品久久久久久久久搜平片| 专区另类欧美日韩| 亚洲一区二区三区四区在线免费观看| 午夜精品久久久久久久99樱桃| 九九精品一区二区| 成人高清免费观看| 欧美日韩国产小视频| 精品美女一区二区三区| 中文文精品字幕一区二区| 亚洲精选免费视频| 蜜臀va亚洲va欧美va天堂| 国产91在线观看| 欧美日韩午夜影院| 久久精品一区八戒影视| 亚洲自拍与偷拍| 国产精品一区二区三区网站| 欧洲一区二区av| 久久亚区不卡日本| 午夜精品久久一牛影视| 国产一区二区免费看| 91久久一区二区| 久久久亚洲午夜电影| 亚洲午夜在线观看视频在线| 国产成人av电影在线播放| 欧美影视一区二区三区| 国产视频在线观看一区二区三区| 亚洲国产一区在线观看| 成人免费的视频| 欧美一级在线免费| 亚洲国产综合色| 丁香六月综合激情| 欧美大片在线观看| 亚洲成av人综合在线观看| av色综合久久天堂av综合| 欧美一级黄色大片| 亚洲成av人影院| 色综合天天综合给合国产| 久久久亚洲欧洲日产国码αv| 亚洲h精品动漫在线观看| 成人av资源在线| 久久久久久久久久久久久久久99| 人人超碰91尤物精品国产| 在线免费观看不卡av| 日本一区二区三区在线观看| 极品少妇一区二区| 欧美一区二区三区小说| 亚洲自拍与偷拍| 在线免费观看日本欧美| 亚洲视频一二区| 97精品电影院| 亚洲色图20p| 色婷婷综合久久久中文字幕| 日本一区二区三区国色天香| 国产露脸91国语对白| 精品区一区二区| 国产麻豆视频一区| 久久精品亚洲精品国产欧美kt∨| 轻轻草成人在线| 欧美不卡一二三| 久久精品国产亚洲高清剧情介绍| 制服丝袜中文字幕一区| 亚洲成人av电影在线| 欧美日韩精品一区二区三区| 亚洲一区欧美一区| 欧美老人xxxx18| 蜜桃久久精品一区二区| 亚洲精品一线二线三线无人区| 久久国产综合精品| 久久亚洲私人国产精品va媚药| 国产一区二区三区四区五区入口| 国产亚洲欧美一级| av一本久道久久综合久久鬼色| 亚洲三级理论片| 欧美日韩精品一区二区天天拍小说| 午夜久久电影网| 精品国产伦理网| 大陆成人av片| 亚洲最色的网站| 日韩免费观看高清完整版| 国产精品2024| 亚洲美女在线一区| 欧美一区二区三区在线| 国产一区二区在线观看免费| 国产欧美日产一区| 欧美日韩综合不卡| 激情五月婷婷综合网| 欧美国产乱子伦| 欧美理论在线播放| 成人午夜精品一区二区三区| 亚洲综合一区在线| 久久亚洲影视婷婷| 欧美专区亚洲专区| 韩国一区二区在线观看| 亚洲欧美日韩人成在线播放| 欧美高清视频www夜色资源网| 韩国成人精品a∨在线观看| 国产精品二三区| 日韩精品一区二区三区老鸭窝| 99久久国产免费看| 日本不卡一二三区黄网| 亚洲人成人一区二区在线观看| 777a∨成人精品桃花网| 成人午夜免费av| 精品一区二区三区视频在线观看| 亚洲欧洲日韩女同| 欧美mv日韩mv| 9191国产精品| 欧美做爰猛烈大尺度电影无法无天| 国产精品亚洲综合一区在线观看| 亚洲一区二区三区四区的| 国产午夜一区二区三区| 欧美一区二区三区的| 在线观看国产日韩| 不卡av免费在线观看| 久久电影网站中文字幕| 亚洲一区免费视频| 国产女人18毛片水真多成人如厕| 欧美一级精品在线| 欧美巨大另类极品videosbest | 免费观看久久久4p| 亚洲色图一区二区| 国产精品免费视频网站| 26uuu久久天堂性欧美| 日韩你懂的电影在线观看| 欧美日韩你懂的| 欧美网站一区二区| 91福利在线观看| 91国内精品野花午夜精品| av亚洲产国偷v产偷v自拍| 成人精品免费网站| 成人av资源站| 99天天综合性| 成人免费毛片片v| 国产麻豆日韩欧美久久| 国产在线看一区| 国产一区二区免费看| 国产一区二区三区四区在线观看| 久久se精品一区精品二区| 韩国成人精品a∨在线观看| 男人的j进女人的j一区| 捆绑调教一区二区三区| 美女在线观看视频一区二区| 久久狠狠亚洲综合| 国产乱子伦一区二区三区国色天香| 久久99热这里只有精品| 国产精品自在在线| 国产 欧美在线| 成人理论电影网| 91美女片黄在线| 欧美日韩亚洲综合在线| 日韩一区二区在线看| 日韩一区二区在线观看视频播放| 26uuuu精品一区二区| 国产精品久久久久影院色老大| 中文字幕在线不卡一区| 亚洲一线二线三线视频| 热久久免费视频| 国产一区二区三区四区五区入口| 成人激情免费电影网址| 日本精品免费观看高清观看| 欧美一级高清大全免费观看| 欧美精品一区二区在线观看| 国产精品美女视频| 亚洲6080在线| 国产成人a级片| 欧美日韩另类一区| 国产视频视频一区| 亚洲一区二区三区四区在线| 韩国欧美国产1区| 在线观看亚洲一区| 久久精品一区二区三区不卡牛牛| 亚洲美女淫视频| 精品一区二区三区欧美| 色婷婷久久99综合精品jk白丝| 日韩精品在线一区二区| 中文字幕一区二区在线播放| 日韩中文字幕一区二区三区| 国产精品18久久久久久久久久久久| 91丨九色丨国产丨porny| 日韩欧美专区在线| 一区二区在线看| 国产一区二区三区久久久|