[jira] [Commented] (SLING-3374) Overlay sendRedirect to set relative Location header
[ https://issues.apache.org/jira/browse/SLING-3374?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14341798#comment-14341798 ] Laurie byrum commented on SLING-3374: - [~justinedelson] or [~bdelacretaz]: sorry for the dumb question, but can you give a reference for your statement that the spec says to only allow fully qualified locations? The only thing i could find that was relevant was http://trac.tools.ietf.org/wg/httpbis/trac/ticket/185 which 3 years ago determined that relative locations should be allowed. Thanks! Overlay sendRedirect to set relative Location header Key: SLING-3374 URL: https://issues.apache.org/jira/browse/SLING-3374 Project: Sling Issue Type: Bug Reporter: Laurie byrum Recently, Location headers returned from redirects started being absolute instead of relative. We should try to decorate this in sling. Can we replace the sendRedirect with a set-header set-status combination in sling? -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Resolved] (SLING-4334) Need to expose do.not.distribute in API
[ https://issues.apache.org/jira/browse/SLING-4334?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Laurie byrum resolved SLING-4334. - Resolution: Fixed Need to expose do.not.distribute in API --- Key: SLING-4334 URL: https://issues.apache.org/jira/browse/SLING-4334 Project: Sling Issue Type: Bug Components: Distribution Reporter: Laurie byrum Priority: Critical I want to distribute in an event listener. However, to avoid loops, i want to make use of the do.not.distribute userproperty that the distribution code sets. However, this property is nowhere in the API. Bare minimum, it would be good to expose that string. Better would be a util method that takes an event and says whether the event was generated by distribution. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SLING-4334) Need to expose do.not.distribute in API
[ https://issues.apache.org/jira/browse/SLING-4334?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14283994#comment-14283994 ] Laurie byrum commented on SLING-4334: - Thanks, Tommaso! That's all i need then. Need to expose do.not.distribute in API --- Key: SLING-4334 URL: https://issues.apache.org/jira/browse/SLING-4334 Project: Sling Issue Type: Bug Components: Distribution Reporter: Laurie byrum Priority: Critical I want to distribute in an event listener. However, to avoid loops, i want to make use of the do.not.distribute userproperty that the distribution code sets. However, this property is nowhere in the API. Bare minimum, it would be good to expose that string. Better would be a util method that takes an event and says whether the event was generated by distribution. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Closed] (SLING-4334) Need to expose do.not.distribute in API
[ https://issues.apache.org/jira/browse/SLING-4334?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Laurie byrum closed SLING-4334. --- Need to expose do.not.distribute in API --- Key: SLING-4334 URL: https://issues.apache.org/jira/browse/SLING-4334 Project: Sling Issue Type: Bug Components: Distribution Reporter: Laurie byrum Priority: Critical I want to distribute in an event listener. However, to avoid loops, i want to make use of the do.not.distribute userproperty that the distribution code sets. However, this property is nowhere in the API. Bare minimum, it would be good to expose that string. Better would be a util method that takes an event and says whether the event was generated by distribution. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SLING-4338) NODE_MOVED event not handled correctly in distribution event trigger
[ https://issues.apache.org/jira/browse/SLING-4338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14284339#comment-14284339 ] Laurie byrum commented on SLING-4338: - (or you could just remove NODE_MOVED from the list of event types, and you will get an ADD and/or a DELETE as appropriate) NODE_MOVED event not handled correctly in distribution event trigger Key: SLING-4338 URL: https://issues.apache.org/jira/browse/SLING-4338 Project: Sling Issue Type: Bug Components: Distribution Reporter: Laurie byrum in https://github.com/apache/sling/blob/ea9eda824479a6a7998981c2cc2e34610a0e86ea/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/trigger/impl/JcrEventDistributionTrigger.java if a node is being moved, a delete of the old location needs to happen in addition to the add of the new location. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (SLING-4338) NODE_MOVED event not handled correctly in distribution event trigger
Laurie byrum created SLING-4338: --- Summary: NODE_MOVED event not handled correctly in distribution event trigger Key: SLING-4338 URL: https://issues.apache.org/jira/browse/SLING-4338 Project: Sling Issue Type: Bug Components: Distribution Reporter: Laurie byrum in https://github.com/apache/sling/blob/ea9eda824479a6a7998981c2cc2e34610a0e86ea/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/trigger/impl/JcrEventDistributionTrigger.java if a node is being moved, a delete of the old location needs to happen in addition to the add of the new location. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (SLING-4334) Need to expose do.not.distribute in API
Laurie byrum created SLING-4334: --- Summary: Need to expose do.not.distribute in API Key: SLING-4334 URL: https://issues.apache.org/jira/browse/SLING-4334 Project: Sling Issue Type: Bug Components: Distribution Reporter: Laurie byrum Priority: Critical I want to distribute in an event listener. However, to avoid loops, i want to make use of the do.not.distribute userproperty that the distribution code sets. However, this property is nowhere in the API. Bare minimum, it would be good to expose that string. Better would be a util method that takes an event and says whether the event was generated by distribution. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Resolved] (SLING-4287) Cannot activate agent factory in osgi console
[ https://issues.apache.org/jira/browse/SLING-4287?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Laurie byrum resolved SLING-4287. - Resolution: Fixed verified this is fixed with very latest source. Cannot activate agent factory in osgi console - Key: SLING-4287 URL: https://issues.apache.org/jira/browse/SLING-4287 Project: Sling Issue Type: Bug Components: Distribution Reporter: Laurie byrum A NPE occurs if you start with a disabled SyncDistributionAgentFactory and later enable it in the felix OSGi configmgr. It happens at https://github.com/apache/sling/blob/cf076879f572d9976fd002d67e48108af5992eaa/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/SyncDistributionAgentFactory.java#l162 Here is a partial stack trace: 06.01.2015 16:34:33.950 *ERROR* [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.sling.distribution.agent.impl.SyncDistributionAgentFactory.810b0979-8c7c-4fe6-aa47-6ddf430485e0)] org.apache.sling.distribution.core [org.apache.sling.distribution.agent.impl.SyncDistributionAgentFactory(141)] The activate method has thrown an exception (java.lang.NullPointerException) java.lang.NullPointerException: null at java.util.Hashtable.put(Hashtable.java:514) at org.apache.sling.distribution.agent.impl.SyncDistributionAgentFactory.activate(SyncDistributionAgentFactory.java:161) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) This is because config.get(DistributionConstants.PN_IS_RESOURCE) is always returning null if you edit via the osgi config. I worked around this locally by having a default value for isResource. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (SLING-4287) Cannot activate agent factory in osgi console
Laurie byrum created SLING-4287: --- Summary: Cannot activate agent factory in osgi console Key: SLING-4287 URL: https://issues.apache.org/jira/browse/SLING-4287 Project: Sling Issue Type: Bug Components: Distribution Reporter: Laurie byrum A NPE occurs if you start with a disabled SyncDistributionAgentFactory and later enable it in the felix OSGi configmgr. It happens at https://github.com/apache/sling/blob/cf076879f572d9976fd002d67e48108af5992eaa/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/agent/impl/SyncDistributionAgentFactory.java#l162 Here is a partial stack trace: 06.01.2015 16:34:33.950 *ERROR* [CM Event Dispatcher (Fire ConfigurationEvent: pid=org.apache.sling.distribution.agent.impl.SyncDistributionAgentFactory.810b0979-8c7c-4fe6-aa47-6ddf430485e0)] org.apache.sling.distribution.core [org.apache.sling.distribution.agent.impl.SyncDistributionAgentFactory(141)] The activate method has thrown an exception (java.lang.NullPointerException) java.lang.NullPointerException: null at java.util.Hashtable.put(Hashtable.java:514) at org.apache.sling.distribution.agent.impl.SyncDistributionAgentFactory.activate(SyncDistributionAgentFactory.java:161) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) This is because config.get(DistributionConstants.PN_IS_RESOURCE) is always returning null if you edit via the osgi config. I worked around this locally by having a default value for isResource. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (SLING-4107) org.apache.sling.replication.util not exported
Laurie byrum created SLING-4107: --- Summary: org.apache.sling.replication.util not exported Key: SLING-4107 URL: https://issues.apache.org/jira/browse/SLING-4107 Project: Sling Issue Type: Bug Components: Replication Reporter: Laurie byrum ReplicationJcrUtils::isSafe is meant to be useable outside of the replication bundle, I believe (as part of the fix for sling-3993). But it can't be used because it isn't listed in the Export-Package declaration in the pom. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (SLING-4107) org.apache.sling.replication.util not exported
[ https://issues.apache.org/jira/browse/SLING-4107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Laurie byrum updated SLING-4107: Description: ReplicationJcrUtils::isSafe is meant to be useable outside of the replication bundle, I believe (as part of the fix for sling-3993). But it can't be used because its package isn't listed in the Export-Package declaration in the pom. (was: ReplicationJcrUtils::isSafe is meant to be useable outside of the replication bundle, I believe (as part of the fix for sling-3993). But it can't be used because it isn't listed in the Export-Package declaration in the pom.) org.apache.sling.replication.util not exported -- Key: SLING-4107 URL: https://issues.apache.org/jira/browse/SLING-4107 Project: Sling Issue Type: Bug Components: Replication Reporter: Laurie byrum ReplicationJcrUtils::isSafe is meant to be useable outside of the replication bundle, I believe (as part of the fix for sling-3993). But it can't be used because its package isn't listed in the Export-Package declaration in the pom. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (SLING-4051) Warning about unset VLT package version when using Sling replication
[ https://issues.apache.org/jira/browse/SLING-4051?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14183497#comment-14183497 ] Laurie byrum commented on SLING-4051: - FYI: verified that this still happens on the receiving node during pubsync with 0.0.1-r1633864 Warning about unset VLT package version when using Sling replication Key: SLING-4051 URL: https://issues.apache.org/jira/browse/SLING-4051 Project: Sling Issue Type: Bug Components: Replication Reporter: Laurie byrum Assignee: Tommaso Teofili I use the following code to replicate: @Reference(target = (name=blah-reverse), policy = ReferencePolicy.DYNAMIC, cardinality = ReferenceCardinality.OPTIONAL_UNARY) ReplicationAgent replicationAgent; private void reverseReplicate(String path) throws AgentReplicationException { if (replicationAgent != null) { ReplicationRequest replicationRequest = new ReplicationRequest(0, ReplicationActionType.ADD, path); replicationAgent.execute(replicationRequest); } } I get the following warning in my log when that happens: 14.10.2014 14:13:54.544 *WARN* [0:0:0:0:0:0:0:1 [1413321186378] POST blah HTTP/1.1] org.apache.jackrabbit.vault.packaging.impl.PackagePropertiesImpl Package does not specify a version. setting to '' -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (SLING-4084) Expose option to replicate ACLs in the replicaton api
Laurie byrum created SLING-4084: --- Summary: Expose option to replicate ACLs in the replicaton api Key: SLING-4084 URL: https://issues.apache.org/jira/browse/SLING-4084 Project: Sling Issue Type: Improvement Components: Replication Reporter: Laurie byrum The vault packager can embed ACLs and they can therefore be replicated. The replication code needs to specify some strategies for building/importing the packages from the request in a generic way, which in the end will lead to use those options in the vlt package builder. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (SLING-4062) Sling replication deleting ACLs nodes
Laurie byrum created SLING-4062: --- Summary: Sling replication deleting ACLs nodes Key: SLING-4062 URL: https://issues.apache.org/jira/browse/SLING-4062 Project: Sling Issue Type: Bug Components: Replication Reporter: Laurie byrum I use @Reference(target = (name=blah-reverse), policy = ReferencePolicy.DYNAMIC, cardinality = ReferenceCardinality.OPTIONAL_UNARY) ReplicationAgent replicationAgent; public createUser() { final UserManager userManager = AccessControlUtil.getUserManager(session); User user = (User)userManager.getAuthorizable(userId); if (user == null) { user = userManager.createUser(userId, password, new Principal() { @Override public String getName() { return userId; } }, userPath); session.save(); } } ... private void reverseReplicate(String path) throws AgentReplicationException { if (replicationAgent != null) { ReplicationRequest replicationRequest = new ReplicationRequest(0, ReplicationActionType.ADD, path); replicationAgent.execute(replicationRequest); } } If you look at the user node before replication happens, there is a rep:policy node under it with jcr:all access for the user. After the reverse replication poll interval happens and replication completes, the rep:policy node is missing! -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (SLING-4051) Warning about unset version when using replication.next
Laurie byrum created SLING-4051: --- Summary: Warning about unset version when using replication.next Key: SLING-4051 URL: https://issues.apache.org/jira/browse/SLING-4051 Project: Sling Issue Type: Bug Components: Replication Reporter: Laurie byrum I use the following code to replicate: @Reference(target = (name=blah-reverse), policy = ReferencePolicy.DYNAMIC, cardinality = ReferenceCardinality.OPTIONAL_UNARY) ReplicationAgent replicationAgent; private void reverseReplicate(String path) throws AgentReplicationException { if (replicationAgent != null) { ReplicationRequest replicationRequest = new ReplicationRequest(0, ReplicationActionType.ADD, path); replicationAgent.execute(replicationRequest); } } I get the following warning in my log when that happens: 14.10.2014 14:13:54.544 *WARN* [0:0:0:0:0:0:0:1 [1413321186378] POST blah HTTP/1.1] org.apache.jackrabbit.vault.packaging.impl.PackagePropertiesImpl Package does not specify a version. setting to '' -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (SLING-4015) Basic auth fails if preemptive auth needed
Laurie byrum created SLING-4015: --- Summary: Basic auth fails if preemptive auth needed Key: SLING-4015 URL: https://issues.apache.org/jira/browse/SLING-4015 Project: Sling Issue Type: Bug Components: Replication Reporter: Laurie byrum If you replicate to an instance that requires preemptive basic auth, replication fails. You can reproduce this by setting the anonymous flag in the authentication service on the target instance. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (SLING-4015) Basic auth fails if preemptive auth needed
[ https://issues.apache.org/jira/browse/SLING-4015?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Laurie byrum updated SLING-4015: Attachment: sling.dif this patch fixes the problem Basic auth fails if preemptive auth needed -- Key: SLING-4015 URL: https://issues.apache.org/jira/browse/SLING-4015 Project: Sling Issue Type: Bug Components: Replication Reporter: Laurie byrum Attachments: sling.dif If you replicate to an instance that requires preemptive basic auth, replication fails. You can reproduce this by setting the anonymous flag in the authentication service on the target instance. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (SLING-3517) SlingPostServlet catches all throwables and logs them at debug level
Laurie byrum created SLING-3517: --- Summary: SlingPostServlet catches all throwables and logs them at debug level Key: SLING-3517 URL: https://issues.apache.org/jira/browse/SLING-3517 Project: Sling Issue Type: Bug Components: Servlets Affects Versions: Servlets Post 2.3.4 Reporter: Laurie byrum On line 203 of http://grepcode.com/file/repo1.maven.org/maven2/org.apache.sling/org.apach e.sling.servlets.post/2.3.2/org/apache/sling/servlets/post/impl/SlingPostS ervlet.java#SlingPostServlet.doPost%28org.apache.sling.api.SlingHttpServle tRequest%2Corg.apache.sling.api.SlingHttpServletResponse%29 it does a log.debug and turns the exception into a server error. That makes it much harder to get to the problem when we throw exceptions. I talked to Carsten and Felix about this. Felix replied: Should we really catch Throwable here ? Maybe we should limit to Exception and have Errors bubble up. Carsten agreed.. -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Created] (SLING-3400) Sling holds resource providers after they have been unregistered
Laurie byrum created SLING-3400: --- Summary: Sling holds resource providers after they have been unregistered Key: SLING-3400 URL: https://issues.apache.org/jira/browse/SLING-3400 Project: Sling Issue Type: Bug Reporter: Laurie byrum We have been checking to see what class references leak after our code has been unloaded. One thing that leaks is our resource provider which is being held in Sling's Resource Resolver. -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Created] (SLING-3373) Location header from sling redirects is now absolute
Laurie byrum created SLING-3373: --- Summary: Location header from sling redirects is now absolute Key: SLING-3373 URL: https://issues.apache.org/jira/browse/SLING-3373 Project: Sling Issue Type: Bug Components: General Reporter: Laurie byrum We’re now returning the absolute path in the Location header instead of a relative path. For example: http://localhost:4503/content/usergenerated/content/geometrixx-outdoors/en/mypage/blah/blah vs /content/usergenerated/content/geometrixx-outdoors/en/mypage/blah/blah This looks like a consequence of our switch from CQSE to Jetty. It was suggested that we should try to patch this in jetty or decorate it in sling. Can we replace the sendRedirect with a set-header set-status combination in sling? -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Updated] (SLING-3373) Location header from sling redirects is now absolute
[ https://issues.apache.org/jira/browse/SLING-3373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Laurie byrum updated SLING-3373: Description: We’re now returning the absolute path in the Location header instead of a relative path. For example: http://localhost:4503/content/usergenerated/content/geometrixx-outdoors/en/mypage/blah/blah vs /content/usergenerated/content/geometrixx-outdoors/en/mypage/blah/blah It was suggested that we should try to patch this in jetty or decorate it in sling. Can we replace the sendRedirect with a set-header set-status combination in sling? was: We’re now returning the absolute path in the Location header instead of a relative path. For example: http://localhost:4503/content/usergenerated/content/geometrixx-outdoors/en/mypage/blah/blah vs /content/usergenerated/content/geometrixx-outdoors/en/mypage/blah/blah This looks like a consequence of our switch from CQSE to Jetty. It was suggested that we should try to patch this in jetty or decorate it in sling. Can we replace the sendRedirect with a set-header set-status combination in sling? Location header from sling redirects is now absolute Key: SLING-3373 URL: https://issues.apache.org/jira/browse/SLING-3373 Project: Sling Issue Type: Bug Components: General Reporter: Laurie byrum We’re now returning the absolute path in the Location header instead of a relative path. For example: http://localhost:4503/content/usergenerated/content/geometrixx-outdoors/en/mypage/blah/blah vs /content/usergenerated/content/geometrixx-outdoors/en/mypage/blah/blah It was suggested that we should try to patch this in jetty or decorate it in sling. Can we replace the sendRedirect with a set-header set-status combination in sling? -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Created] (SLING-3374) Overlay sendRedirect to get relative Location header
Laurie byrum created SLING-3374: --- Summary: Overlay sendRedirect to get relative Location header Key: SLING-3374 URL: https://issues.apache.org/jira/browse/SLING-3374 Project: Sling Issue Type: Bug Reporter: Laurie byrum Recently, Location headers returned from redirects started being absolute instead of relative. We should try to decorate this in sling. Can we replace the sendRedirect with a set-header set-status combination in sling? -- This message was sent by Atlassian JIRA (v6.1.5#6160)
[jira] [Created] (SLING-3201) Redirect after post not possible
Laurie byrum created SLING-3201: --- Summary: Redirect after post not possible Key: SLING-3201 URL: https://issues.apache.org/jira/browse/SLING-3201 Project: Sling Issue Type: Bug Components: General Reporter: Laurie byrum We are using the default post servlet and have PostOperation implementations that run some of our code and set up the response. In certain cases, we'd like to redirect (via a 302 response + Location header). When we do this, the 302 is returned, but the Location isn't set because of code here: http://grepcode.com/file/repo1.maven.org/maven2/org.apache.sling/org.apache.sling.servlets.post/2.3.0/org/apache/sling/servlets/post/AbstractPostResponse.java#320 I talked to Felix Meschberger about this. His response was: Looking at the code and the HTTP spec, I would think that the iff statement is incomplete and should not only encompass the 201/CREATED code but also the 3xx redirect codes, something like: if (statusCode == HttpServletResponse.SC_CREATED || statusCode / 100 == 3) { response.setHeader(Location, getLocation()); } So, I would think this is a bug (or oversight) in the AbstractPostResponse. Do you mind reporting a Sling issue ? -- This message was sent by Atlassian JIRA (v6.1#6144)