Aha, trying curl
with POST reveals something.
$ curl -v -d "(+ 1 1)" -H "Content-Type: text/plain" <http://127.0.0.1:8080/repl>
* Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to 127.0.0.1 (127.0.0.1) port 8080 (#0)
> POST /repl HTTP/1.1
> Host: 127.0.0.1:8080
> User-Agent: curl/7.58.0
> Accept: */*
> Content-Type: text/plain
> Content-Length: 7
>
* upload completely sent off: 7 out of 7 bytes
< HTTP/1.1 403 Forbidden
< Content-Type: text/html
< Server: Aleph/0.4.4
< Connection: Keep-Alive
< Date: Fri, 06 Mar 2020 15:35:21 GMT
< content-length: 35
<
* Connection #0 to host 127.0.0.1 left intact
<h1>Invalid anti-forgery token</h1>
^^ So the error is unique to our tool, and I'll have to figure out how to disable this check.Commenting out one of the relevant lines in the app (for now) I have gotten past that. Now I see a different error that seems legitimately related to Drawbridge.
$ lein repl :connect <http://127.0.0.1:8080/repl>
Connecting to nREPL at <http://127.0.0.1:8080/repl>
IllegalArgumentException Cannot open <nil> as a Reader.
<http://clojure.java.io/fn--11490|clojure.java.io/fn--11490> (io.clj:288)
<http://clojure.java.io/fn--11490|clojure.java.io/fn--11490> (io.clj:288)
<http://clojure.java.io/fn--11392/G--11368--11399|clojure.java.io/fn--11392/G--11368--11399> (io.clj:69)
<http://clojure.java.io/reader|clojure.java.io/reader> (io.clj:102)
<http://clojure.java.io/reader|clojure.java.io/reader> (io.clj:86)
drawbridge.client/ring-client-transport/fill--4204 (client.clj:25)
drawbridge.client/ring-client-transport/http--4208 (client.clj:42)
nrepl.transport.FnTransport (transport.clj:41)
nrepl.core/client/this--9259 (core.clj:56)
clojure.core/comp/fn--5792 (core.clj:2569)
clojure.core/comp/fn--5792 (core.clj:2569)
clojure.lang.AFunction$1.doInvoke (AFunction.java:31)
Bye for now!
Probably it’s something to do with the web server that drawbridge starts, not so much with drawbridge itself.
Unfortunately I’m slammed at work these days, so I can’t look into this.
I can try to make a minimal reproduction which is bound to be helpful. Possibly I'll even be able to find the problem. I created a ticket in the issue tracker and will update there with any progress.
Sounds good! :thumbsup_all: