Do not send 2 content-length headers

bug/bundler_fix
sinn3r 2014-08-27 16:05:08 -05:00
parent a32ffc4c26
commit df215a380d
1 changed files with 2 additions and 1 deletions

View File

@ -78,7 +78,6 @@ module Metasploit
'headers' => { 'headers' => {
'Content-Type' => 'application/x-www-form-urlencoded', 'Content-Type' => 'application/x-www-form-urlencoded',
'Cookie' => "JSESSIONID=#{self.jsession}", 'Cookie' => "JSESSIONID=#{self.jsession}",
'Content-Length' => data.length
} }
} }
@ -137,6 +136,8 @@ module Metasploit
if (res and res.code.to_i == 200 and res.body.match(p) != nil) if (res and res.code.to_i == 200 and res.body.match(p) != nil)
return {:status => Metasploit::Model::Login::Status::SUCCESSFUL, :proof => res.body} return {:status => Metasploit::Model::Login::Status::SUCCESSFUL, :proof => res.body}
end end
elsif res and res.code == 400
raise GlassfishError, "400: Bad HTTP request from try_login"
end end
{:status => Metasploit::Model::Login::Status::INCORRECT, :proof => res.body} {:status => Metasploit::Model::Login::Status::INCORRECT, :proof => res.body}