webdriver: Don't return existing session id when the wrong one is supplied (#99)
authorjgraham <james@hoppipolla.co.uk>
Thu, 01 Jun 2017 08:17:13 +0100
changeset 428150 49bd9d2ba19f5bc4bea9d2bf55a3a47cc83855e4
parent 428149 ff1dfad59f1d4586e0cb3a9290aad485deb646ca
child 428151 1fa9b296981543d26bef50071e1892e2891e8328
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone57.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
webdriver: Don't return existing session id when the wrong one is supplied (#99) Source-Repo: https://github.com/mozilla/webdriver-rust Source-Revision: dae3f0689a1d589d10225d558e0528fb232a3842 committer: Andreas Tolfsen <ato@mozilla.com>
testing/webdriver/src/server.rs
--- a/testing/webdriver/src/server.rs
+++ b/testing/webdriver/src/server.rs
@@ -100,19 +100,18 @@ impl<T: WebDriverHandler<U>, U: WebDrive
     fn check_session(&self, msg: &WebDriverMessage<U>) -> WebDriverResult<()> {
         match msg.session_id {
             Some(ref msg_session_id) => {
                 match self.session {
                     Some(ref existing_session) => {
                         if existing_session.id != *msg_session_id {
                             Err(WebDriverError::new(
                                 ErrorStatus::InvalidSessionId,
-                                format!("Got unexpected session id {} expected {}",
-                                        msg_session_id,
-                                        existing_session.id)))
+                                format!("Got unexpected session id {}",
+                                        msg_session_id)))
                         } else {
                             Ok(())
                         }
                     },
                     None => Ok(())
                 }
             },
             None => {