Skip to content

Commit f6ba4ef

Browse files
authored
Merge pull request rust-lang#234 from cmyr/fix-233
fix for rust-lang#233
2 parents 544e7f4 + 6b37190 commit f6ba4ef

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/server.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,8 @@ impl MessageReader for StdioMsgReader {
406406
return None;
407407
}
408408

409-
if res[0] == "Content-length:" {
410-
info!("Header is missing 'Content-length'");
409+
if res[0].to_lowercase() != "content-length:" {
410+
info!("Header is missing 'content-length'");
411411
return None;
412412
}
413413

src/test/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,11 @@ impl ls_server::Output for RecordOutput {
548548

549549
// Initialise the environment for a test.
550550
fn init_env(project_dir: &str) {
551+
match env::var("RUST_TEST_THREADS") {
552+
Ok(ref var) if var == "1" => (),
553+
_ => panic!("Please run tests with `RUST_TEST_THREADS=1 cargo test`"),
554+
};
555+
551556
let mut cwd = env::current_dir().expect(FAIL_MSG);
552557
cwd.push("test_data");
553558
cwd.push(project_dir);

0 commit comments

Comments
 (0)