Closed letnotimitateothers closed 10 years ago
Btw: the correct way to send a file using curl
is like this:
$ curl -k -i -X PUT --data-binary @../tmp.ttl --cert ../eg/test-localhost.pem:test -H "Content-Type: text/turtle; charset=utf-8" https://localhost:8443/2013/card.acl
Content-Type
of what you are sending@../tmp.ttl
for files--data-binary
to avoid weird removal of end of lines - which can be very hard to detectAnyway, the problem was with the way I had implemented PUT, which was from an older version and badly broken. Thanks for finding this.
The PUT replace all existing ACLs of a file by the new ones. Isn't the PUT supposed to do an append of new ACLs ?
Never mind! Actually, it's the PATCH that's supposed to act like that.
I'm unable to update ACL of a file/container.
Case class: *** file1.acl: ➜ rww-play git:(master) ✗ more test_www/file1.acl.ttl https://localhost:8443/2013/file1.acl http://www.w3.org/ns/auth/acl#include https://localhost:8443/2013/.acl .
*** my Update in update.ttl: ➜ rww-play git:(master) ✗ more myTemp.ttl
Processed by Id: cwm.py,v 1.197 2007/12/13 15:38:39 syosi Exp
Notation3 generation by
notation3.py,v 1.200 2007/12/11 21:18:08 syosi Exp
Base was: file:///Users/ameliemedem/Documents/GIT/rww-play/myTemp
*** Curl request: ➜ rww-play git:(master) ✗ curl -k -i -v -X PUT --cert eg/test-localhost.pem:test https://localhost:8443/2013/file1.acl -d myTemp.ttl
*** Error raised : The URI scheme, of the URI file1.acl, must be equal (ignoring case) to 'http', 'https', 'ws', or 'wss' java.lang.IllegalArgumentException: The URI scheme, of the URI file1.acl, must be equal (ignoring case) to 'http', 'https', 'ws', or 'wss' at com.ning.http.util.AsyncHttpProviderUtils.validateSupportedScheme(AsyncHttpProviderUtils.java:148) at com.ning.http.client.RequestBuilderBase$RequestImpl.toURI(RequestBuilderBase.java:173) at com.ning.http.client.RequestBuilderBase$RequestImpl.getURI(RequestBuilderBase.java:156) at com.ning.http.client.RequestBuilderBase$RequestImpl.getUrl(RequestBuilderBase.java:142) at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.doConnect(NettyAsyncHttpProvider.java:903) at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.execute(NettyAsyncHttpProvider.java:890) at com.ning.http.client.AsyncHttpClient.executeRequest(AsyncHttpClient.java:520) at org.w3.play.api.libs.ws.WS$WSRequest.execute(WS.scala:188) at org.w3.play.api.libs.ws.WSTrait$WSRequestHolder.get(WS.scala:419) at rww.ldp.WSClient.fetch(WebClient.scala:81) at rww.ldp.WSClient$$anonfun$get$1.apply(WebClient.scala:117) at rww.ldp.WSClient$$anonfun$get$1.apply(WebClient.scala:116) at scala.Option.getOrElse(Option.scala:120) at rww.ldp.WSClient.get(WebClient.scala:116) at rww.ldp.LDPWebActor.runCmd(LDPWebActor.scala:94) at rww.ldp.LDPWebActor$$anonfun$receive$1.applyOrElse(LDPWebActor.scala:252) at scala.runtime.AbstractPartialFunction$mcVL$sp.apply$mcVL$sp(AbstractPartialFunction.scala:33) at scala.runtime.AbstractPartialFunction$mcVL$sp.apply(AbstractPartialFunction.scala:33) at scala.runtime.AbstractPartialFunction$mcVL$sp.apply(AbstractPartialFunction.scala:25) at rww.ldp.RActor$$anon$1.apply(LDPStore.scala:30) at rww.ldp.RActor$$anon$1.apply(LDPStore.scala:24) at scala.PartialFunction$class.applyOrElse(PartialFunction.scala:118) at rww.ldp.RActor$$anon$1.applyOrElse(LDPStore.scala:24) at akka.actor.ActorCell.receiveMessage(ActorCell.scala:498) at akka.actor.ActorCell.invoke(ActorCell.scala:456) at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:237) at akka.dispatch.Mailbox.run(Mailbox.scala:219) at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:386) at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260) at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339) at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979) at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)