Fork me on GitHub
#nrepl
<
2020-03-06
>
Joe Corneli15:03:16

Aha, trying curl with POST reveals something.

Joe Corneli15:03:57

$ curl -v -d "(+ 1 1)" -H "Content-Type: text/plain" 
*   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.

Joe Corneli16:03:16

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.

Joe Corneli16:03:39

$ lein repl :connect 
Connecting to nREPL at 
IllegalArgumentException Cannot open <nil> as a Reader.
	 (io.clj:288)
	 (io.clj:288)
	 (io.clj:69)
	 (io.clj:102)
	 (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!

bozhidar17:03:09

Probably it’s something to do with the web server that drawbridge starts, not so much with drawbridge itself.

bozhidar17:03:19

Unfortunately I’m slammed at work these days, so I can’t look into this.

Joe Corneli17:03:38

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.

bozhidar17:03:17

Sounds good! thumbsup_all