Hmm, that's a good question. The headers is an enumeration, which is somewhat old and deprecated. I don't know if it has always parsed the headers or if it only parses them on the demand of the enumeration. I might be able to clean it up some, however. 



On April 7, 2014 8:40:09 AM CDT, Adrian J George III <notifications@github.com> wrote:
>>              } else if (!requestHasAcceptHeader) {
>> -               
>director.requestHeaderManager().putHeader(CommonHttpHeader.ACCEPT.toString(),
>preferredMediaType.getName());
>> +                headerManager.putHeader(ACCEPT.toString(),
>preferredMediaType.getName());
>> +            } else {
>> +                //We have an Accept header, lets see if it contains
>something we're looking for
>> +                Enumeration<String> headerEnumeration =
>request.getHeaders(ACCEPT.toString());
>
>How expensive is this? I ask because we do it twice. Wouldn't it be
>simpler to just grab them once and have the if do the check there
>instead of pulling it just to see if there are some and put that value
>into a boolean that never gets accessed again beyond the single check.
>
>---
>Reply to this email directly or view it on GitHub:
>https://github.com/rackerlabs/repose/pull/923/files#r11343465
>
>!DSPAM:23,5342aabc95691240581384!

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.