You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by "Weygandt, Jon" <jw...@ebay.com> on 2009/10/05 19:34:13 UTC

content-rewrite feature not implemented per OpenSocial 0.9 spec

Per the OS v0.9 spec:
http://www.opensocial.org/Technical-Resources/opensocial-spec-v09/Gadget
s-API-Specification.html#rfc.section.3.4
The include-url, exclude-url are singular, and the parameters may be
repeated. Plus "*" is a valid pattern.
Plus there are minify-* parameters
 
Per the code in ContentRewriterFeature.java
include-urls, exclude-urls are plural, and there can be only one.
Plus the pattern is fed to Pattern.compile, so "*" throws an exception.
 
Unless people feel strongly the spec is incorrect, I can put together a
patch that will keep the plural versions for backward compatibility, but
also properly honors the singular versions per the spec. Perhaps even
add the "minify-*" options.
 
Jon

RE: content-rewrite feature not implemented per OpenSocial 0.9 spec

Posted by "Weygandt, Jon" <jw...@ebay.com>.
Since this feature is a "MAY", I would like to add another switch to
shindig.properties: shindig.content-rewrite.only-allow-excludes

This will only allow the gadget author to specify values for
"exclude-url" or "exclude-urls", only allow subtractions from
"include-tags", and to not increase "expires" above the default value.
It would disallow: "include-url", "include-urls".

Rationale: As the host of the gadget server, I have decided what URLs
and types and ttls are suitable for my installation. I do not want a
gadget author to be able to increase any of those values, but should the
gadget author decide they don't want content rewritten, or a shorter
caching, that would be allowed.

Comments?
Jon

-----Original Message-----
From: Weygandt, Jon [mailto:jweygandt@ebay.com] 
Sent: Monday, October 05, 2009 10:34 AM
To: shindig-dev@incubator.apache.org
Subject: content-rewrite feature not implemented per OpenSocial 0.9 spec

Per the OS v0.9 spec:
http://www.opensocial.org/Technical-Resources/opensocial-spec-v09/Gadget
s-API-Specification.html#rfc.section.3.4
The include-url, exclude-url are singular, and the parameters may be
repeated. Plus "*" is a valid pattern.
Plus there are minify-* parameters
 
Per the code in ContentRewriterFeature.java include-urls, exclude-urls
are plural, and there can be only one.
Plus the pattern is fed to Pattern.compile, so "*" throws an exception.
 
Unless people feel strongly the spec is incorrect, I can put together a
patch that will keep the plural versions for backward compatibility, but
also properly honors the singular versions per the spec. Perhaps even
add the "minify-*" options.
 
Jon

RE: content-rewrite feature not implemented per OpenSocial 0.9 spec

Posted by "Weygandt, Jon" <jw...@ebay.com>.
I have create a JIRA, patch, and codereview for a fix to this, along
with a few other related bugs.

https://issues.apache.org/jira/browse/SHINDIG-1192
http://codereview.appspot.com/130079

TIA,
Jon

-----Original Message-----
From: Weygandt, Jon 
Sent: Monday, October 05, 2009 4:31 PM
To: 'shindig-dev@incubator.apache.org'
Subject: RE: content-rewrite feature not implemented per OpenSocial 0.9
spec

Since this feature is a "MAY", I would like to add another switch to
shindig.properties: shindig.content-rewrite.only-allow-excludes

This will only allow the gadget author to specify values for
"exclude-url" or "exclude-urls", only allow subtractions from
"include-tags", and to not increase "expires" above the default value.
It would disallow: "include-url", "include-urls".

Rationale: As the host of the gadget server, I have decided what URLs
and types and ttls are suitable for my installation. I do not want a
gadget author to be able to increase any of those values, but should the
gadget author decide they don't want content rewritten, or a shorter
caching, that would be allowed.

Comments?
Jon

-----Original Message-----
From: Weygandt, Jon [mailto:jweygandt@ebay.com]
Sent: Monday, October 05, 2009 10:34 AM
To: shindig-dev@incubator.apache.org
Subject: content-rewrite feature not implemented per OpenSocial 0.9 spec

Per the OS v0.9 spec:
http://www.opensocial.org/Technical-Resources/opensocial-spec-v09/Gadget
s-API-Specification.html#rfc.section.3.4
The include-url, exclude-url are singular, and the parameters may be
repeated. Plus "*" is a valid pattern.
Plus there are minify-* parameters
 
Per the code in ContentRewriterFeature.java include-urls, exclude-urls
are plural, and there can be only one.
Plus the pattern is fed to Pattern.compile, so "*" throws an exception.
 
Unless people feel strongly the spec is incorrect, I can put together a
patch that will keep the plural versions for backward compatibility, but
also properly honors the singular versions per the spec. Perhaps even
add the "minify-*" options.
 
Jon