-rw-r--r-- | lib/util.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/util.cc b/lib/util.cc index ee75d29..a9b9bed 100644 --- a/lib/util.cc +++ b/lib/util.cc @@ -284,32 +284,33 @@ namespace opkele { psegs.push(rv.length()); if(c!='/') { pseg += c; qf = true; } rv += '/'; rv += pseg; } if(c=='/' && (n>=ul || strchr("?#",uri[n])) ) { rv += '/'; if(n<ul) qf = true; }else if(strchr("?#",c)) { if(psegs.size()==1 && psegs.top()==rv.length()) rv += '/'; if(pseg.empty()) rv += c; qf = true; } pseg.clear(); }else{ pseg += c; } } if(!pseg.empty()) { - rv += '/'; rv += pseg; + if(!qf) rv += '/'; + rv += pseg; } return rv; } } } |