{"action":"opened","issue":{"number":198,"created_at":"2011-10-25T13:17:30Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"I'm trying to use capybara-webkit with basic auth. I saw ticket #69 in which @jferris suggested using the `header` method to set the request headers. Nice idea, but it doesn't seem to work. Here's my code (that lives in a `background` block in a steak test suite):\r\n\r\n    auth_string = ActiveSupport::Base64.encode64(\"username:password\")\r\n    driver = Capybara.current_session.driver\r\n    driver.header \"Authorization\", \"Basic #{auth_string}\"\r\n\r\nI was getting HTTP code 411 which means that the content length wasn't specified. I ran tcpdump to capture the data that was getting sent over the socket, and pulled this lump of text out of the results:\r\n\r\n    POST /weathercentre/flurries HTTP/1.1\r\n    Origin: http://127.0.0.1:52898\r\n    User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/533.3 (KHTML, like Gecko) capybara-webkit Safari/533.3\r\n    Content-Type: application/x-www-form-urlencoded\r\n    Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5\r\n    Referer: http://127.0.0.1:52898/weathercentre/flurries\r\n    Authorization: Basic bWZpc2g6aHVycmljYW5l\r\n    \r\n    Content-Length: 58\r\n    Connection: Keep-Alive\r\n    Accept-Encoding: gzip\r\n    Accept-Language: en-US,*\r\n    Host: 127.0.0.1:52898\r\n\r\nAnd there's the blank line.\r\n\r\nShould I have set this header some other way? No other approach was leaping out at me.\r\n\r\nIf you want to use this technique to reproduce it, here's the command I ran:\r\n\r\n    tcpdump -A -s 64000 -i lo0 tcp\r\n\r\nI'm using ree-1.8.7-2011.03, capybara 1.1.1 and capybara-webkit 0.7.2.","comments":0,"title":"Setting header inserts blank line","updated_at":"2011-10-25T13:17:30Z","url":"https://api.github.com/repos/thoughtbot/capybara-webkit/issues/198","id":2044812,"assignee":null,"milestone":null,"closed_at":null,"user":{"gravatar_id":"7abc37c95590b1b29400e0bddfff9156","avatar_url":"https://secure.gravatar.com/avatar/7abc37c95590b1b29400e0bddfff9156?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/gma","id":2122,"login":"gma"},"html_url":"https://github.com/thoughtbot/capybara-webkit/issues/198","labels":[],"state":"open"},"legacy":{"number":198,"action":"opened","issue":2044812}}