##// END OF EJS Templates
bundle2: protect capabilities name and values with url quoting...
Pierre-Yves David -
r21137:341a0836 default
parent child Browse files
Show More
@@ -712,6 +712,8 b' def handlereplycaps(op, inpart):'
712 else:
712 else:
713 key, vals = line.split('=', 1)
713 key, vals = line.split('=', 1)
714 vals = vals.split(',')
714 vals = vals.split(',')
715 key = urllib.unquote(key)
716 vals = [urllib.unquote(v) for v in vals]
715 caps[key] = vals
717 caps[key] = vals
716 if op.reply is None:
718 if op.reply is None:
717 op.reply = bundle20(op.ui, caps)
719 op.reply = bundle20(op.ui, caps)
@@ -72,7 +72,7 b' Create an extension to test bundle2 API'
72 > raise util.Abort('%s' % exc)
72 > raise util.Abort('%s' % exc)
73 >
73 >
74 > if opts['reply']:
74 > if opts['reply']:
75 > capsstring = 'ping-pong\nelephants=babar,celeste\ncity=celesteville'
75 > capsstring = 'ping-pong\nelephants=babar,celeste\ncity%3D%21=celeste%2Cville'
76 > bundler.addpart(bundle2.bundlepart('replycaps', data=capsstring))
76 > bundler.addpart(bundle2.bundlepart('replycaps', data=capsstring))
77 >
77 >
78 > revs = opts['rev']
78 > revs = opts['rev']
@@ -547,9 +547,9 b' The reply is a bundle'
547 Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko
547 Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko
548 Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko
548 Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko
549 Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko.
549 Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko.
550 \x00\x00\x00\x00\x00\x1b\x06output\x00\x00\x00\x01\x00\x01\x0b\x01in-reply-to4\x00\x00\x00\xc6debugreply: capabilities: (esc)
550 \x00\x00\x00\x00\x00\x1b\x06output\x00\x00\x00\x01\x00\x01\x0b\x01in-reply-to4\x00\x00\x00\xc9debugreply: capabilities: (esc)
551 debugreply: 'city'
551 debugreply: 'city=!'
552 debugreply: 'celesteville'
552 debugreply: 'celeste,ville'
553 debugreply: 'elephants'
553 debugreply: 'elephants'
554 debugreply: 'babar'
554 debugreply: 'babar'
555 debugreply: 'celeste'
555 debugreply: 'celeste'
@@ -569,7 +569,7 b' The reply is valid'
569 :output:
569 :output:
570 mandatory: 0
570 mandatory: 0
571 advisory: 1
571 advisory: 1
572 payload: 198 bytes
572 payload: 201 bytes
573 :test:pong:
573 :test:pong:
574 mandatory: 1
574 mandatory: 1
575 advisory: 0
575 advisory: 0
@@ -588,8 +588,8 b' Unbundle the reply to get the output:'
588 remote: Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko
588 remote: Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko
589 remote: Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko.
589 remote: Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko.
590 remote: debugreply: capabilities:
590 remote: debugreply: capabilities:
591 remote: debugreply: 'city'
591 remote: debugreply: 'city=!'
592 remote: debugreply: 'celesteville'
592 remote: debugreply: 'celeste,ville'
593 remote: debugreply: 'elephants'
593 remote: debugreply: 'elephants'
594 remote: debugreply: 'babar'
594 remote: debugreply: 'babar'
595 remote: debugreply: 'celeste'
595 remote: debugreply: 'celeste'
General Comments 0
You need to be logged in to leave comments. Login now