Jump to content


Photo

DLNA profile header problem

dlna header comparison string

  • Please log in to reply
No replies to this topic

#1 eTomm OFFLINE  

eTomm

    Advanced Member

  • Members
  • 50 posts
  • Local time: 12:50 AM

Posted 22 November 2015 - 12:50 PM

Hello,

just a little note regarding the string comparison used in the profile matching algorithm.

 

I have a samsung JS8500 of 2015. It wasn't catching the profile Samsung Smart TV. I debugged the logs, and I noticed after awhile that the user-agent was sent in the request completely uppercase.

 

USER-AGENT=DLNADOC/1.50 SEC_HHP_

 

As is the case for all the other headers in the request.

 

So I modified the profile and created a new one inserting the header in uppercase and it worked.

 

I suppose, but I didn't look at the code, that the profile matching code (and I hope just it, otherwise other parts too can be broken) is using an StringComparison.Ordinal for string comparison of headers or for the various find function. I would suggest to switch to StringComparison.OrdinalIgnoreCase.

 

Best regards,

Tommaso Ercole 

 

 


  • Luke likes this





Also tagged with one or more of these keywords: dlna, header, comparison, string

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users