conformal/btcwire — pull request #15 by tuxcanfly (2014-04-19 10:39:01+00:00)
Title: Better support for user agent

Refs #10

We're defaulting the UA to `/btcwire:0.0.1/` (hardcoded right now as I'm not sure how to inspect the current version) and allowing customization using `AddUserAgent`. I've also moved the validation to a new function `validateUserAgent` for re-usability. Also, the validation can be extended to cover reserved symbols: `['/', ':', '(', ')']`.

Added tests with/without comments.