Project

General

Profile

Actions

Bug #2477

closed

[patch] Host header is not set correctly

Added by benbrown about 11 years ago. Updated about 11 years ago.

Status:
Fixed
Priority:
Normal

Description

If you specify the Host header using the -H argument it is appended to the request, rather than replacing the Host set in the request.

To replicate this I set up lighttpd with the following accesslog format:

accesslog.format = "%t %{Host}i"

If I run weighttp as below:

weighttp -n 1 localhost -H "Host: www.example.com"

The following log entry is created:

[17/Feb/2013:13:19:53 +0000] localhost, www.example.com

I have attached a patch, which will replace the host in the request header, and prevent a duplicate host header from being added.


Files

weighttp_host.patch (1.73 KB) weighttp_host.patch benbrown, 2013-02-17 14:23
Actions #1

Updated by benbrown about 11 years ago

I've raised a pull request in github, https://github.com/lighttpd/weighttp/pull/4

Actions #2

Updated by benbrown about 11 years ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100
Actions

Also available in: Atom