Fix derivedFrom searches on Fritz!Box UPnP Media Servers. #2

Merged
merged 1 commit into from May 2, 2012

Conversation

Projects
None yet
3 participants
Contributor

RAOF commented May 2, 2012

The SearchCriteria string syntax specifies “derivedfrom” as one of the
stringOps.

At least one UPnP MediaServer (my Fritz!Box) throws an error when trying
to search with derivedFrom.

QueryStringifier: Match capitalisation of spec.
The SearchCriteria string syntax specifies “derivedfrom” as one of the
stringOps.

At least one UPnP MediaServer (my Fritz!Box) throws an error when trying
to search with derivedFrom.

alexkay added a commit that referenced this pull request May 2, 2012

Merge pull request #2 from RAOF/master
Fix derivedFrom searches on Fritz!Box UPnP Media Servers.

@alexkay alexkay merged commit e08316a into mono:master May 2, 2012

Contributor

alexkay commented May 2, 2012

If you have the spec at hand, could you check if there are other mismatches, e.g. "doesNotContain" in the same file.

Cheers!

Contributor

bl8 commented May 2, 2012

This looks like it might fix the following bug reported against Banshee:
https://bugzilla.gnome.org/show_bug.cgi?id=673702

Chris, did you get a similar exception when you encountered the issue ?

Contributor

bl8 commented May 2, 2012

Chris, you can ignore my previous request, I've seen the stacktrace you pastebin'ed. Looks similar enough to the bug linked above.

Contributor

RAOF commented May 2, 2012

The spec¹ is wonderful - doesNotContain is camel-cased, but derivedfrom is not. The full BNF for the search string is:

SearchCriteria string syntax is described here formally using EBNF as described in section 2.3.2.
searchCrit ::= searchExp | asterisk
searchExp ::= relExp |
searchExp wChar+ logOp wChar+ searchExp |
‘(’ wChar* searchExp wChar* ‘)’
logOp ::= ‘and’ | ‘or’
relExp ::= property wChar+ binOp wChar+ quotedVal |
property wChar+ existsOp wChar+ boolVal
binOp ::= relOp | stringOp
relOp ::= ‘=’ | ‘!=’ | ‘<’ | ‘<=’ | ‘>’ | ‘>=’
stringOp ::= ‘contains’ | ‘doesNotContain’ | ‘derivedfrom’
existsOp ::= ‘exists’
boolVal ::= ‘true’ | ‘false’
quotedVal ::= dQuote escapedQuote dQuote
wChar ::= space | hTab | lineFeed |
vTab | formFeed | return
property ::= (* property name as defined in section 2.4 )
escapedQuote ::= (
double-quote escaped string as defined in section 2.3.1 )
hTab ::= (
UTF-8 code 0x09, horizontal tab character )
lineFeed ::= (
UTF-8 code 0x0A, line feed character )
vTab ::= (
UTF-8 code 0x0B, vertical tab character )
formFeed ::= (
UTF-8 code 0x0C, form feed character )
return ::= (
UTF-8 code 0x0D, carriage return character )
space ::= ‘ ’ (
UTF-8 code 0x20, space character )
dQuote ::= ‘"’ (
UTF-8 code 0x22, double quote character )
asterisk ::= ‘
’ (* UTF-8 code 0x2A, asterisk character *)

The rest of that file matches, only derivedFrom had capitalisation differing from the spec.

1: http://upnp.org/specs/av/UPnP-av-ContentDirectory-v1-Service.pdf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment