What node version are you using? Works fine for me on v0.10.25:

$ cat test.js
require('http').createServer(function(req, res) {
  res.writeHead(200, {Something: 'yep'})
  res.end()
}).listen(3000)

$ node test.js &
[1] 85457

$ curl -v localhost:3000
* Adding handle: conn: 0x7fdc09004000
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x7fdc09004000) send_pipe: 1, recv_pipe: 0
* About to connect() to localhost port 3000 (#0)
*   Trying ::1...
*   Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 3000 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.30.0
> Host: localhost:3000
> Accept: */*
>
< HTTP/1.1 200 OK
< Something: yep
< Date: Fri, 24 Jan 2014 06:59:58 GMT
< Connection: keep-alive
< Transfer-Encoding: chunked
<
* Connection #0 to host localhost left intact

On Friday, 24 January 2014 06:20:19 UTC+11, Dave Winer wrote:
>
> I seem to be having this problem, not sure what the solution or workaround 
> is.
>
> I'm writing the head as follows:
>
> response.writeHead (200, {"Content-Type": "text/html", 
> "Access-Control-Allow-Origin": "fargo.io"});
>
> When it shows up on the client, the header names are lowercased.
>
> Happens in two clients, so I'm fairly sure it's the server doing this.
>
> It doesn't look like this was resolved in 2012.
>
> Help! :-)
>
> Dave
>
>
>
> On Tuesday, March 8, 2011 7:43:56 PM UTC-5, Eran Hammer-Lahav wrote:
>>
>> A recent update changed how client request headers are sent to force all 
>> headers to lowercase. This is causing problems with some well-established 
>> (and non-compliant) servers which look for specific case-sensitive 
>> formatting. My application is now failing on both the 'Authorization' and 
>> 'Cookie' headers with some large providers.
>>
>> I see the value in changing incoming headers to lowercase, but it would 
>> be better to leave outbound headers alone and allow applications to set the 
>> headers to the exact format expected by the server in case of a misbehaving 
>> provider.
>>
>> Can this be changed back?
>>
>> EHL
>>
>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to