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

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

?? response.pm

?? 1. 記錄每個帖子的訪問人情況
?? PM
字號:
## $Id: Response.pm,v 1.36 2001/11/15 06:42:40 gisle Exp $package HTTP::Response;=head1 NAMEHTTP::Response - Class encapsulating HTTP Responses=head1 SYNOPSIS require HTTP::Response;=head1 DESCRIPTIONThe C<HTTP::Response> class encapsulates HTTP style responses.  Aresponse consists of a response line, some headers, and (potentiallyempty) content. Note that the LWP library also uses HTTP styleresponses for non-HTTP protocol schemes.Instances of this class are usually created and returned by theC<request()> method of an C<LWP::UserAgent> object: #... $response = $ua->request($request) if ($response->is_success) {     print $response->content; } else {     print $response->error_as_HTML; }C<HTTP::Response> is a subclass of C<HTTP::Message> and thereforeinherits its methods.  The inherited methods most often used are header(),push_header(), remove_header(), and content().The header convenience methods are also available.  SeeL<HTTP::Message> for details.The following additional methods are available:=over 4=cutrequire HTTP::Message;@ISA = qw(HTTP::Message);$VERSION = sprintf("%d.%02d", q$Revision: 1.36 $ =~ /(\d+)\.(\d+)/);use HTTP::Status ();use strict;=item $r = HTTP::Response->new($rc, [$msg, [$header, [$content]]])Constructs a new C<HTTP::Response> object describing a response withresponse code C<$rc> and optional message C<$msg>.  The message is ashort human readable single line string that explains the responsecode.=cutsub new{    my($class, $rc, $msg, $header, $content) = @_;    my $self = $class->SUPER::new($header, $content);    $self->code($rc);    $self->message($msg);    $self;}sub clone{    my $self = shift;    my $clone = bless $self->SUPER::clone, ref($self);    $clone->code($self->code);    $clone->message($self->message);    $clone->request($self->request->clone) if $self->request;    # we don't clone previous    $clone;}=item $r->code([$code])=item $r->message([$message])=item $r->request([$request])=item $r->previous([$previousResponse])These methods provide public access to the object attributes.  Thefirst two contain respectively the response code and the messageof the response.The request attribute is a reference the request that caused thisresponse.  It does not have to be the same request as passed to the$ua->request() method, because there might have been redirects andauthorization retries in between.The previous attribute is used to link together chains of responses.You get chains of responses if the first response is redirect orunauthorized.=cutsub code      { shift->_elem('_rc',      @_); }sub message   { shift->_elem('_msg',     @_); }sub previous  { shift->_elem('_previous',@_); }sub request   { shift->_elem('_request', @_); }=item $r->status_lineReturns the string "E<lt>code> E<lt>message>".  If the message attributeis not set then the official name of E<lt>code> (see L<HTTP::Status>)is substituted.=cutsub status_line{    my $self = shift;    my $code = $self->{'_rc'}  || "000";    my $mess = $self->{'_msg'} || HTTP::Status::status_message($code) || "?";    return "$code $mess";}=item $r->baseReturns the base URI for this response.  The return value will be areference to a URI object.The base URI is obtained from one the following sources (in priorityorder):=over 4=item 1.Embedded in the document content, for instance <BASE HREF="...">in HTML documents.=item 2.A "Content-Base:" or a "Content-Location:" header in the response.For backwards compatability with older HTTP implementations we willalso look for the "Base:" header.=item 3.The URI used to request this response. This might not be the originalURI that was passed to $ua->request() method, because we might havereceived some redirect responses first.=backWhen the LWP protocol modules produce the HTTP::Response object, thenany base URI embedded in the document (step 1) will already haveinitialized the "Content-Base:" header. This means that this methodonly performs the last 2 steps (the content is not always availableeither).=cutsub base{    my $self = shift;    my $base = $self->header('Content-Base')     ||  # used to be HTTP/1.1               $self->header('Content-Location') ||  # HTTP/1.1               $self->header('Base');                # HTTP/1.0    return $HTTP::URI_CLASS->new_abs($base, $self->request->uri);    # So yes, if $base is undef, the return value is effectively    # just a copy of $self->request->uri.}=item $r->as_stringReturns a textual representation of the response.  Mainlyuseful for debugging purposes. It takes no arguments.=cutsub as_string{    require HTTP::Status;    my $self = shift;    my @result;    #push(@result, "---- $self ----");    my $code = $self->code;    my $status_message = HTTP::Status::status_message($code) || "Unknown code";    my $message = $self->message || "";    my $status_line = "$code";    my $proto = $self->protocol;    $status_line = "$proto $status_line" if $proto;    $status_line .= " ($status_message)" if $status_message ne $message;    $status_line .= " $message";    push(@result, $status_line);    push(@result, $self->headers_as_string);    my $content = $self->content;    if (defined $content) {	push(@result, $content);    }    #push(@result, ("-" x 40));    join("\n", @result, "");}=item $r->is_info=item $r->is_success=item $r->is_redirect=item $r->is_errorThese methods indicate if the response was informational, sucessful, aredirection, or an error.=cutsub is_info     { HTTP::Status::is_info     (shift->{'_rc'}); }sub is_success  { HTTP::Status::is_success  (shift->{'_rc'}); }sub is_redirect { HTTP::Status::is_redirect (shift->{'_rc'}); }sub is_error    { HTTP::Status::is_error    (shift->{'_rc'}); }=item $r->error_as_HTML()Returns a string containing a complete HTML document indicating whaterror occurred.  This method should only be called when $r->is_erroris TRUE.=cutsub error_as_HTML{    my $self = shift;    my $title = 'An Error Occurred';    my $body  = $self->status_line;    return <<EOM;<HTML><HEAD><TITLE>$title</TITLE></HEAD><BODY><H1>$title</H1>$body</BODY></HTML>EOM}=item $r->current_ageCalculates the "current age" of the response asspecified by E<lt>draft-ietf-http-v11-spec-07> section 13.2.3.  Theage of a response is the time since it was sent by the origin server.The returned value is a number representing the age in seconds.=cutsub current_age{    my $self = shift;    # Implementation of <draft-ietf-http-v11-spec-07> section 13.2.3    # (age calculations)    my $response_time = $self->client_date;    my $date = $self->date;    my $age = 0;    if ($response_time && $date) {	$age = $response_time - $date;  # apparent_age	$age = 0 if $age < 0;    }    my $age_v = $self->header('Age');    if ($age_v && $age_v > $age) {	$age = $age_v;   # corrected_received_age    }    my $request = $self->request;    if ($request) {	my $request_time = $request->date;	if ($request_time) {	    # Add response_delay to age to get 'corrected_initial_age'	    $age += $response_time - $request_time;	}    }    if ($response_time) {	$age += time - $response_time;    }    return $age;}=item $r->freshness_lifetimeCalculates the "freshness lifetime" of the responseas specified by E<lt>draft-ietf-http-v11-spec-07> section 13.2.4.  The"freshness lifetime" is the length of time between the generation of aresponse and its expiration time.  The returned value is a numberrepresenting the freshness lifetime in seconds.If the response does not contain an "Expires" or a "Cache-Control"header, then this function will apply some simple heuristic based on'Last-Modified' to determine a suitable lifetime.=cutsub freshness_lifetime{    my $self = shift;    # First look for the Cache-Control: max-age=n header    my @cc = $self->header('Cache-Control');    if (@cc) {	my $cc;	for $cc (@cc) {	    my $cc_dir;	    for $cc_dir (split(/\s*,\s*/, $cc)) {		if ($cc_dir =~ /max-age\s*=\s*(\d+)/i) {		    return $1;		}	    }	}    }    # Next possibility is to look at the "Expires" header    my $date = $self->date || $self->client_date || time;          my $expires = $self->expires;    unless ($expires) {	# Must apply heuristic expiration	my $last_modified = $self->last_modified;	if ($last_modified) {	    my $h_exp = ($date - $last_modified) * 0.10;  # 10% since last-mod	    if ($h_exp < 60) {		return 60;  # minimum	    } elsif ($h_exp > 24 * 3600) {		# Should give a warning if more than 24 hours according to		# <draft-ietf-http-v11-spec-07> section 13.2.4, but I don't		# know how to do it from this function interface, so I just		# make this the maximum value.		return 24 * 3600;	    }	    return $h_exp;	} else {	    return 3600;  # 1 hour is fallback when all else fails	}    }    return $expires - $date;}=item $r->is_freshReturns TRUE if the response is fresh, based on the values offreshness_lifetime() and current_age().  If the response is no longerfresh, then it has to be refetched or revalidated by the originserver.=cutsub is_fresh{    my $self = shift;    $self->freshness_lifetime > $self->current_age;}=item $r->fresh_untilReturns the time when this entiy is no longer fresh.=cutsub fresh_until{    my $self = shift;    return $self->freshness_lifetime - $self->current_age + time;}1;=back =head1 COPYRIGHTCopyright 1995-2001 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一区二区三区免费野_久草精品视频
精品在线一区二区| 99久久777色| 久久精品男人天堂av| 国产suv精品一区二区883| 中文字幕av一区二区三区免费看 | 91色porny| 午夜在线电影亚洲一区| 日韩视频一区二区三区在线播放| 麻豆国产欧美一区二区三区| 国产欧美一区二区精品秋霞影院| 色悠悠久久综合| 精品亚洲国内自在自线福利| 国产精品久久久久久亚洲毛片 | 91福利在线看| 久久99精品久久久久久动态图| 国产精品国产三级国产aⅴ入口| 欧美一区在线视频| 色综合久久88色综合天天免费| 久久狠狠亚洲综合| 日韩精品电影一区亚洲| 亚洲国产成人av| 国产免费观看久久| 欧美成人a∨高清免费观看| 欧美日韩免费一区二区三区视频| 97国产精品videossex| 国产成人av电影在线| 国产美女精品人人做人人爽| 日韩不卡手机在线v区| 偷拍自拍另类欧美| 五月激情丁香一区二区三区| 亚洲国产另类av| 亚洲二区在线视频| 青青草国产精品97视觉盛宴| 亚洲va韩国va欧美va| 亚洲福利视频一区| 日韩国产精品久久久| 美国十次了思思久久精品导航| 美女高潮久久久| 国产成人激情av| 白白色亚洲国产精品| 欧美综合视频在线观看| 欧美电影在线免费观看| 欧美tickling网站挠脚心| 久久久久久免费网| 午夜精品一区二区三区免费视频| 久久不见久久见中文字幕免费| 精品亚洲国产成人av制服丝袜 | 亚洲激情六月丁香| 欧美优质美女网站| 日本高清不卡在线观看| 久久伊99综合婷婷久久伊| 日本亚洲天堂网| 日韩午夜电影在线观看| 蜜乳av一区二区| 国内精品国产成人| 99re这里只有精品首页| 日韩午夜在线观看| 国产精品久久久久久户外露出| 亚洲成人在线免费| 国产精品系列在线播放| 精品视频在线免费| 中文字幕二三区不卡| 国产乱码一区二区三区| 白白色亚洲国产精品| 日韩精品最新网址| 亚洲一区二区五区| 99综合影院在线| 国产精品久久99| 久久精品国产99久久6| 欧美电视剧在线看免费| 久久国产精品色| 国产日韩欧美一区二区三区乱码| 蜜桃av一区二区在线观看| 亚洲精品一区二区三区香蕉| 麻豆成人免费电影| 久久午夜羞羞影院免费观看| 国产一区二区免费看| 国产欧美日韩综合| 9i看片成人免费高清| 亚洲成人一区二区在线观看| 日韩一区二区三区免费看| 韩国女主播成人在线观看| 精品女同一区二区| 色婷婷亚洲婷婷| 视频一区中文字幕| 亚洲欧美一区二区三区国产精品| 色噜噜狠狠一区二区三区果冻| 麻豆精品在线播放| 国产精品国产三级国产普通话99 | 欧美午夜片在线看| 99久久99久久久精品齐齐| 麻豆精品视频在线观看免费| 亚洲精品一区二区三区福利| 色妞www精品视频| 福利一区福利二区| 日本色综合中文字幕| 亚洲人123区| 亚洲国产成人自拍| 久久午夜电影网| 欧美一二区视频| 7777精品伊人久久久大香线蕉的| 99在线精品观看| av亚洲精华国产精华| 成人18视频在线播放| 国产综合成人久久大片91| 精品在线视频一区| 激情文学综合丁香| 六月丁香综合在线视频| 男女男精品视频| 亚洲一区二区在线免费观看视频| 国产欧美一区二区在线| 欧美不卡一区二区三区四区| 欧美影院一区二区三区| 一本一道综合狠狠老| 99在线精品免费| 国产成人亚洲综合色影视| **欧美大码日韩| 国产精品久久久久久久久快鸭| 精品国精品国产| 日韩精品一区二区在线观看| 欧美剧情片在线观看| 欧美日韩国产片| 欧美在线一二三四区| 欧美亚洲免费在线一区| 欧美老女人第四色| 欧美色网站导航| 日韩欧美激情四射| 日韩美一区二区三区| 精品国产乱码久久久久久久| 日韩视频中午一区| 久久九九久久九九| 欧美挠脚心视频网站| 国产精品每日更新| 亚洲a一区二区| 成人午夜电影网站| 日韩精品专区在线影院重磅| 中文字幕一区二区在线播放 | 亚洲综合视频在线| 国产老女人精品毛片久久| 欧美老人xxxx18| 亚洲最大成人网4388xx| 国产91富婆露脸刺激对白| 成人精品免费看| 91国内精品野花午夜精品 | 久久日韩精品一区二区五区| 国产色综合久久| 久久精品国产99久久6| 欧美在线观看一区二区| 精品国产一区二区三区久久久蜜月| 中文字幕精品一区二区精品绿巨人| 亚洲综合图片区| 99久久精品99国产精品| 日韩亚洲欧美一区| 亚洲bdsm女犯bdsm网站| 国产成人亚洲综合a∨婷婷 | 精品国产一区二区三区四区四| 精品久久国产老人久久综合| 亚洲在线成人精品| 92精品国产成人观看免费| 久久综合色综合88| 日韩成人免费看| 日韩一区二区三区四区| 亚洲国产精品嫩草影院| 欧美午夜片在线看| 亚洲欧美激情一区二区| 欧亚一区二区三区| 亚洲aⅴ怡春院| 91精品国产综合久久精品app| 午夜天堂影视香蕉久久| 91看片淫黄大片一级| 亚洲欧美日韩国产综合在线| av一区二区三区黑人| 欧美色精品天天在线观看视频| 亚洲精品久久嫩草网站秘色| 91成人网在线| 日日噜噜夜夜狠狠视频欧美人| 欧美日韩1234| 六月丁香综合在线视频| 国产女人18毛片水真多成人如厕| 成人av免费网站| 久久疯狂做爰流白浆xx| 国产精品污污网站在线观看| 日本韩国欧美国产| 国产一区二区三区黄视频 | 欧美不卡123| 国产91精品欧美| 舔着乳尖日韩一区| 亚洲色图都市小说| 欧美男人的天堂一二区| 国产成人在线视频播放| 亚洲伊人伊色伊影伊综合网| 国产性做久久久久久| 日韩一区二区三区电影在线观看| 成人免费视频视频在线观看免费| 亚洲成人综合在线| 久久综合给合久久狠狠狠97色69| 欧美日韩中文一区| 99精品欧美一区二区蜜桃免费| 亚洲国产精品99久久久久久久久 | 亚洲欧美综合另类在线卡通|