cvsuser     02/07/12 14:04:57

  Modified:    P5EEx/Blue/P5EEx/Blue UserAgent.pm
  Log:
  consult the Request for gzip encoding allowed
  
  Revision  Changes    Path
  1.2       +10 -1     p5ee/P5EEx/Blue/P5EEx/Blue/UserAgent.pm
  
  Index: UserAgent.pm
  ===================================================================
  RCS file: /cvs/public/p5ee/P5EEx/Blue/P5EEx/Blue/UserAgent.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -w -r1.1 -r1.2
  --- UserAgent.pm      12 Mar 2002 16:58:57 -0000      1.1
  +++ UserAgent.pm      12 Jul 2002 21:04:57 -0000      1.2
  @@ -1,6 +1,6 @@
   
   #############################################################################
  -## $Id: UserAgent.pm,v 1.1 2002/03/12 16:58:57 spadkins Exp $
  +## $Id: UserAgent.pm,v 1.2 2002/07/12 21:04:57 spadkins Exp $
   #############################################################################
   
   package P5EEx::Blue::UserAgent;
  @@ -192,6 +192,15 @@
       # return immediately if support for the capability is already determined
       if (defined $self->{supports}{$capability}) {
           return ($self->{supports}{$capability});
  +    }
  +
  +    if ($capability eq "http.header.accept-encoding.x-gzip") {
  +        my ($request, $accept_header, $support_status);
  +        $request = $self->{context}->request();
  +        $accept_header = $request->header("Accept-Encoding");
  +        $support_status = ($accept_header =~ /gzip/) ? 1 : 0;
  +        $self->{supports}{$capability} = $support_status;
  +        return $support_status;
       }
   
       # see if this capability has a "parent" capability
  
  
  


Reply via email to