<div dir="ltr">hi,<br><br>I am trying to implement X-sendurl in my application using uwsgi. I modified my app to generate a couple of http headers:<br><br>215         handler.response.headers['X-Sendurlhost'] = '%s:%d,%s' % (socket.gethostbyname(url.hostname), url.port if url.port is not None else 80, url.hostname)<br>216         handler.response.headers['X-Sendurlpathqs'] = "%s?%s" % (url.path, url.query)<br>217         handler.response.set_status(200)<br><br>and I configured my uwsgi server as follows:<br><br> 29 collect-header = X-Sendurlpathqs X_SENDURLPATHQS<br> 30 collect-header = X-Sendurlhost X_SENDURLHOST<br> 31 response-route-if-not = empty:${X_SENDURLPATHQS} goto:xsendurl<br> 32 response-route-run = last:<br><br> [snip]<br><br> 45 response-route-label = xsendurl<br> 46 response-route-run = rewrite:${X_SENDURLPATHQS}<br> 48 response-route-run = http:${X_SENDURLHOST}<br> 49 response-route-run = last:<br><br>The above configuration appears to hit and execute correctly line 48 above<br><br>with the following values:<br><br><span style="font-family:courier new,monospace">X_SENDURLHOST=<a href="http://137.74.127.78:80">137.74.127.78:80</a>,<a href="http://storage.gra3.cloud.ovh.net">storage.gra3.cloud.ovh.net</a><br>X_SENDURLPATHQS=/v1/AUTH_7542981824cf4bcb883cf4c4321195ae/prod/companies/8/users-profile-attachments/4165024?temp_url_sig=49d3ec9ee9d5fd5aa447fc70162e6fb72c564e99&temp_url_expires=1559049647</span><br><br>I read very carefully the documentation at <a href="https://uwsgi-docs.readthedocs.io/en/latest/InternalRouting.html">https://uwsgi-docs.readthedocs.io/en/latest/InternalRouting.html</a> and I would expect the above to forward an HTTP request to IP 137.74.127.78 on port 80 with HTTP header HOST=<a href="http://storage.gra3.cloud.ovh.net">storage.gra3.cloud.ovh.net</a> and PATH=/v1/AUTH_7542981824cf4...<br><br>However, tcpdump shows instead the following request:<br><br><span style="font-family:courier new,monospace">GET /admin/8/users-profile-attachments/?user_id=5172075&site_id=154&site_type=2 HTTP/1.0<br>Host: localhost:9090<br>...<br><br>HTTP/1.1 401 Unauthorized<br>Content-Length: 131<br>Content-Type: text/html; charset=UTF-8<br>Www-Authenticate: Swift realm="8"<br></span><div><span style="font-family:courier new,monospace">WWW-Authenticate: Keystone uri='<a href="https://auth.cloud.ovh.net/">https://auth.cloud.ovh.net/</a>'<br></span></div><div>...<br><span style="font-family:courier new,monospace"></span></div><div><span style="font-family:courier new,monospace"></span></div><br><div><span style="font-family:courier new,monospace"><span style="font-family:arial,sans-serif">So, uwsgi is connecting to the right IP and port, but it's not sending what I would expect for the HOST HTTP header and HTTP PATH.</span></span></div><div><span style="font-family:courier new,monospace"><span style="font-family:arial,sans-serif"><br></span></span></div><div><span style="font-family:courier new,monospace"><span style="font-family:arial,sans-serif">Is there something I should adjust in my uwsgi configuration to make it forward the Host+PATH headers I want ?</span><br></span></div><br>Mathieu<br>-- <br>Mathieu Lacage <<a href="mailto:mathieu.lacage@alcmeon.com">mathieu.lacage@alcmeon.com</a>></div>