Bad HTTP request

Robert Shilston rtshilston at gmail.com
Mon Feb 7 23:18:14 CET 2011


Hi,

For various reasons we're seeing a request such as:

  276 RxRequest    c POST
  276 RxURL        c /abc
  276 RxProtocol   c HTTP/1.1
  276 RxHeader     c X-Forwarded-For: 1.2.3.4
  276 RxHeader     c x-param-1: 13
  276 RxHeader     c x-param-2: 12sdf
  276 RxHeader     c x-param-3
  276 RxHeader     c x-param-4: DEF
  276 RxHeader     c Host: example.com

The problem is that the HTTP client is sending simply "x-param-3" if the value for this header is null.  When Varnish passes this on to Apache, Apache rejects it as an invalid request.     I can't seem to edit this header in VCL, either by doing an 'if (req.http.x-param-3 == "")...', or by simply 'set req.http.x-param-3 = "foo";'.

Does anyone have a suggestion as to how to deal with this bad HTTP client?  I appreciate the best thing to do is fix the client, but that'll take a few weeks to get redeployed, and I'm hoping to fix this issue in Varnish.


Rob



More information about the varnish-misc mailing list