File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -381,14 +381,16 @@ export class amqpwrapper {
381381 Math . random ( ) . toString ( ) +
382382 Math . random ( ) . toString ( ) ;
383383 }
384-
385-
386-
387- parseurl ( amqp_url ) : url . URL {
388- var q : url . URL = url . parse ( amqp_url , true ) as any ;
389- if ( q . username == null || q . username == "" ) { q . username = "guest" ; }
390- if ( q . password == null || q . password == "" ) { q . password = "guest" ; }
384+ parseurl ( amqp_url ) : url . UrlWithParsedQuery {
385+ var q = url . parse ( amqp_url , true ) ;
386+ ( q as any ) . username = "guest" ;
387+ ( q as any ) . password = "guest" ;
391388 if ( q . port == null || q . port == "" ) { q . port = "15672" ; }
389+ if ( q . auth != null && q . auth != "" ) {
390+ var arr = q . auth . split ( ':' ) ;
391+ ( q as any ) . username = arr [ 0 ] ;
392+ ( q as any ) . password = arr [ 1 ] ;
393+ }
392394 q . protocol = 'http://' ;
393395 return q ;
394396 }
Original file line number Diff line number Diff line change 1- 1.0.32
1+ 1.0.33
You can’t perform that action at this time.
0 commit comments