Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


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

mmaki opened this Issue · 0 comments

2 participants


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:,"
<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:,"
< 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.