Ebeo / google-gdata

Automatically exported from code.google.com/p/google-gdata
0 stars 0 forks source link

AtomLinkCollection.FindService doesnt support parameters in link type #377

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Consider the following link with a type that contains parameters:

<link rel="schema"
            type="application/xml; xmlns=&#34;http://www.blah.com/schemas/_r85HYDq0Ed-
ok5qVHCwRrQ&#34;"
            href="/path/to/blah.xsd"/>

AtomLinkCollection.FindService("schema", "application/xml") will return null.

I fixed it locally by using StartsWith() instead of equality:

                if ((service == null || (linkRel != null && linkRel == service)) &&
                    (type == null || (linkType != null && linkType.StartsWith(type))))

Original issue reported on code.google.com by ydewit@gmail.com on 26 Apr 2010 at 1:43

GoogleCodeExporter commented 9 years ago
When i wrote that code, i had no idea that this is allowed :)

I will patch the code long those lines.

Frank

Original comment by fman...@gmail.com on 26 Apr 2010 at 2:03