summaryrefslogtreecommitdiffabout
path: root/lib
Unidiff
Diffstat (limited to 'lib') (more/less context) (ignore whitespace changes)
-rw-r--r--lib/consumer.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/consumer.cc b/lib/consumer.cc
index cbe0769..bb6358c 100644
--- a/lib/consumer.cc
+++ b/lib/consumer.cc
@@ -332,10 +332,17 @@ namespace opkele {
332 i = sizeof("http://")-1; 332 i = sizeof("http://")-1;
333 }else{ 333 }else{
334 i += sizeof("://")-1; 334 i += sizeof("://")-1;
335 } 335 }
336 if(rv.find('/',i)==string::npos) 336 string::size_type qm = rv.find('?',i);
337 rv += '/'; 337 string::size_type sl = rv.find('/',i);
338 if(qm!=string::npos) {
339 if(sl==string::npos || sl>qm)
340 rv.insert(qm,1,'/');
341 }else{
342 if(sl==string::npos)
343 rv += '/';
344 }
338 return rv; 345 return rv;
339 } 346 }
340 347
341} 348}