Permalink
Browse files

better url parsing

git-svn-id: http://svn.codehaus.org/stomp/ruby/trunk@48 fd4e7336-3dff-0310-b68a-b6615a75f13b
  • Loading branch information...
1 parent c29dee6 commit a83b2154b1594e6085c0945190c3df305984905e brianm committed Feb 1, 2007
Showing with 3 additions and 3 deletions.
  1. +1 −1 Rakefile
  2. +2 −2 lib/stomp.rb
View
@@ -24,7 +24,7 @@ task :default => ['test']
spec = Gem::Specification.new do |s|
s.name = "stomp"
- s.version = "1.0.4"
+ s.version = "1.0.5"
s.author = "Brian McCallister"
s.email = "brianm@apache.org"
s.homepage = "http://stomp.codehaus.org/"
View
@@ -261,13 +261,13 @@ class Client
# Accepts a username (default ""), password (default ""),
# host (default localhost), and port (default 61613)
def initialize user="", pass="", host="localhost", port=61613, reliable=false
- if user =~ /stomp:\/\/(\w+):(\d+)/
+ if user =~ /stomp:\/\/([\w\.]+):(\d+)/
user = ""
pass = ""
host = $1
port = $2
reliable = false
- elsif user =~ /stomp:\/\/(\w+):(\w+)@(\w+):(\d+)/
+ elsif user =~ /stomp:\/\/([\w\.]+):(\w+)@(\w+):(\d+)/
user = $1
pass = $2
host = $3

0 comments on commit a83b215

Please sign in to comment.