-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Description
From forum:
postby mfkilian » Thu Apr 02, 2015 1:07 pm
The strings returned from URI::getPath and URI::getPathAndQuery seem inconsistent:
#include <iostream>
using namespace std;
#include "Poco/URI.h"
int main(int argc, char *argv[]) {
Poco::URI x("/a%20b/c.mp4");
cout << "getPath() = '" << x.getPath() << "'" << endl;
cout << "getPathAndQuery() = '" << x.getPathAndQuery() << "'" << endl;
}
getPath() = '/a b/c.mp4'
getPathAndQuery() = '/a%20b/c.mp4'
Why is getPath() returning decoded content but getPathAndQuery returning the original (encoded) content? It seems inconsistent. It is also not apparent that there is an equivalent of getRawQuery for Path, i.e., getRawPath -- a way to get the original encoded version.
Reactions are currently unavailable