Permalink
Browse files

Make spec pass: "does not respond with UNRECOGNIZED SERVER to FOREST …

…commands"
  • Loading branch information...
Pistos committed Mar 3, 2013
1 parent 8cdf4b1 commit 8a6bbf693490b50ff3cbedb950a50deb73ca0b36
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/libertree/server/responder/dispatcher.rb
@@ -42,7 +42,7 @@ def process(request_raw)
respond 'code' => 'ERROR', 'message' => 'Not INTRODUCEd.'
elsif introduced? && ! authenticated? && command != 'AUTHENTICATE'
respond 'code' => 'ERROR', 'message' => 'Not AUTHENTICATEd.'
elsif introduced? && authenticated? && ! in_a_forest?
elsif introduced? && authenticated? && ! in_a_forest? && command != 'FOREST'
respond 'code' => 'UNRECOGNIZED SERVER'
else
method = "rsp_#{command.downcase.gsub('-', '_')}".to_sym

0 comments on commit 8a6bbf6

Please sign in to comment.