I have apache http server running on Windows 2012 server. It hosts webapp written using Flask and python.
@app.route('/temp/test/<market>/symbol/<path:symbol>/type/<product_type>/')
def test_func_not_in_use(market, symbol, product_type):
return {'key': [market, symbol, product_type]}
Following is the URL and output:
http://<host:port>/temp/test/ICE_IPE/symbol/PSEG%20/PJM%20DA%20PK/type/MLEG/
{
"key": [
"ICE_IPE",
"PSEG/PJM DA PK",
"MLEG"
]
}
Notice that for symbol=PSEG%20/PJM%20DA%20PK value returned is PSEG/PJM DA PK
Space before / is removed.
I have verified that problem is not on Flask side by writing sample app and running it outside of apache. Also there are no rewrite rules defined in apache conf files.
Can someone please explain me what wrong here? And would love to see solution as well.