#1290 RuleSetReferenceId does not process HTTP(S) correctly.

Fixed the bug and added one unit test.