Project

General

Profile

« Previous | Next » 

Revision 9712

merge from 2.6 branch: changes to include expect header and validatesession method

View differences:

Metacat.pm
104 104

  
105 105
  # determine encoding type
106 106
  my $contentType = 'application/x-www-form-urlencoded';
107
  if ($postData{'enctype'}) {
107
  my $expect = "100-continue";
108
	if ($postData{'enctype'}) {
108 109
      $contentType = $postData{'enctype'};
109 110
      delete $postData{'enctype'};
110 111
  }
......
115 116
      # if available, set the Authorization header from the auth_token_header instance variable
116 117
      $request = POST("$self->{'metacatUrl'}",
117 118
                      Content_Type => $contentType,
119
                      Expect => $expect,
118 120
                      Authorization => $self->{'auth_token_header'},
119 121
                      Content => \%postData
120 122
                      );
......
122 124
  } else {
123 125
      $request = POST("$self->{'metacatUrl'}",
124 126
                      Content_Type => $contentType,
127
                      Expect => $expect,
125 128
                      Content => \%postData
126 129
                      );      
127 130
  }
......
209 212
}
210 213

  
211 214
#############################################################
212
# subroutine to log into Metacat and get usr info xml for
213
# a logged in user
215
# subroutine to log into Metacat and get user and group 
216
# information xml for a logged in user
214 217
#############################################################
215 218
sub getUserInfo {
216 219
	my $self = shift;
217 220

  
218
	my %postData = (action => 'getloggedinuserinfo');
221
	my %postData = (action => 'validatesession');
219 222
  
220 223
	my $response = $self->sendData(%postData);
221 224

  

Also available in: Unified diff