{"action":"created","issue":{"url":"https://api.github.com/repos/kellabyte/Haywire/issues/65","labels_url":"https://api.github.com/repos/kellabyte/Haywire/issues/65/labels{/name}","comments_url":"https://api.github.com/repos/kellabyte/Haywire/issues/65/comments","events_url":"https://api.github.com/repos/kellabyte/Haywire/issues/65/events","html_url":"https://github.com/kellabyte/Haywire/pull/65","id":95420968,"number":65,"title":"Include support for adding or setting response headers.","user":{"login":"tobz","id":222615,"avatar_url":"https://avatars.githubusercontent.com/u/222615?v=3","gravatar_id":"","url":"https://api.github.com/users/tobz","html_url":"https://github.com/tobz","followers_url":"https://api.github.com/users/tobz/followers","following_url":"https://api.github.com/users/tobz/following{/other_user}","gists_url":"https://api.github.com/users/tobz/gists{/gist_id}","starred_url":"https://api.github.com/users/tobz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tobz/subscriptions","organizations_url":"https://api.github.com/users/tobz/orgs","repos_url":"https://api.github.com/users/tobz/repos","events_url":"https://api.github.com/users/tobz/events{/privacy}","received_events_url":"https://api.github.com/users/tobz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-07-16T12:14:04Z","updated_at":"2015-07-21T16:01:07Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/kellabyte/Haywire/pulls/65","html_url":"https://github.com/kellabyte/Haywire/pull/65","diff_url":"https://github.com/kellabyte/Haywire/pull/65.diff","patch_url":"https://github.com/kellabyte/Haywire/pull/65.patch"},"body":"The crucial bit here is that adding is additive only (i.e. you can double add a header) whereas setting will also add, but if it finds a header with the same name, it will simply update that existing header.\r\n\r\nIt will only override the first header it finds that matches, though, so if you double add a header, and then try to set the same header, it's only going to update the first.  I don't think that's a corner case worth dealing with, though, unless someone has a good use case to warrant scanning all headers outright."},"comment":{"url":"https://api.github.com/repos/kellabyte/Haywire/issues/comments/123385169","html_url":"https://github.com/kellabyte/Haywire/pull/65#issuecomment-123385169","issue_url":"https://api.github.com/repos/kellabyte/Haywire/issues/65","id":123385169,"user":{"login":"kellabyte","id":676347,"avatar_url":"https://avatars.githubusercontent.com/u/676347?v=3","gravatar_id":"","url":"https://api.github.com/users/kellabyte","html_url":"https://github.com/kellabyte","followers_url":"https://api.github.com/users/kellabyte/followers","following_url":"https://api.github.com/users/kellabyte/following{/other_user}","gists_url":"https://api.github.com/users/kellabyte/gists{/gist_id}","starred_url":"https://api.github.com/users/kellabyte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kellabyte/subscriptions","organizations_url":"https://api.github.com/users/kellabyte/orgs","repos_url":"https://api.github.com/users/kellabyte/repos","events_url":"https://api.github.com/users/kellabyte/events{/privacy}","received_events_url":"https://api.github.com/users/kellabyte/received_events","type":"User","site_admin":false},"created_at":"2015-07-21T16:01:07Z","updated_at":"2015-07-21T16:01:07Z","body":"Make sure you don't benchmark on localhost. Use 2 separate machines for client and server.\r\n\r\nThis script is an example of a benchmark you can run on the client against Haywire:\r\nhttps://github.com/kellabyte/Haywire/blob/master/benchmark/benchmark.sh\r\n\r\nYou can change the arguments to Wrk to change different workload scenarios like more connections or less pipelined requests.\r\n\r\nYou probably want to benchmark against small amounts of headers vs a decent amount of headers and different workloads of mostly additive vs 50% additive and 50% update or something.\r\n\r\nBottom line, we care about performance in every change we make. My goal with Haywire is to try and be the fastest HTTP server there is. Lofty goals but it keeps the focus on performance in mind :)"}}