From: "ara.t.howard" Date: 2007-11-16T12:44:51+09:00 Subject: Re: Net::HTTP header issue On Nov 15, 2007, at 6:36 AM, Edward Liu wrote: > I am trying to use custom headers, and I am having an issue with how > Net::HTTP handles this. Let's say I want to add the header "a-header" > to the HTTP message I am sending to a server. When I turn on a TCP > monitor to check on the message, I notice that Net::HTTP changes > "a-header" to "A-Header". I would like to prevent Net::HTTP from > changing the casing of my header, but I would also like to avoid > modifying the Net::HTTP library to do this. Is there a solution to > prevent Net::HTTP from changing the casing of "a-header" without > modifying the Net::HTTP library (like a function in that library to > call > to stop the casing change)? If not, what is the cleanest solution to > modify Net::HTTP for this issue? Thanks! > -- > Posted via http://www.ruby-forum.com/. > you can try something like class CaseSensitiveHeader < ::String def capitalize() self end end add_header CaseSensitiveHeader.new('a-header'), value or module Net module HTTPHeader def capitalize(name) name end end end just took a quick look at the net/http.rb, but one of them will work. a @ http://codeforpeople.com/ -- we can deny everything, except that we have the possibility of being better. simply reflect on that. h.h. the 14th dalai lama