Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

X-Forwaded-Host causes 400 (Bad Request) #520

Open
mmaki opened this Issue · 0 comments

2 participants

@mmaki

When doing a request to Riak with two X-Forwarded-Host-values (comma separated) with ports, I get a 400 (Bad Request).

curl -H "X-Forwarded-Host: test.com:80, test.com:80" http://test2.com:8098/riak/p-bucket/noimg.png
<html><head><title>400 Bad Request</title></head><body><h1>Bad Request</h1>Invalid Host<p><hr><address>mochiweb+webmachine web server</address></body></html>

However when doing the same request without ports, the requested image is served correctly:

curl -H "X-Forwarded-Host: test.com:80, test.com:80" http://test2.com:8098/riak/p-bucket/noimg.png
< binary output removed >

Version: 2.0.0-pre20. Also had same bug with 2.0.0-pre11.

I've now solved this by unsetting X-Forwarded-Host-header in Apache, which we use as a proxy.

@jonmeredith jonmeredith added this to the 2.1 milestone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.