Ticket/533

Build upon https://github.com/spray/spray/pull/545 to deliver the fix for #533