Closed sugarjig closed 1 month ago
Forgot to mention that when I try the same request in Postman, I get Error: aborted
. Trying it in the JetBrains HTTP client, I get org.apache.http.ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 20; received: 17)
Hey. Thanks for the report. Looks like this was caused by the request headers being blindly copied when sending the L402 challenge header. Created a quick PR here: https://github.com/lightninglabs/aperture/issues/114. Will need to make sure nothing else breaks with that, but it should fix your issue.
Thanks for the quick response!
I have a very simple web service running locally. It has a POST endpoint at
/hello
that accepts a JSON body of the formand it responds with a body like
When I try using Aperture to proxy the request, I get an error. Here is the curl command I'm using
and the error I get is
However, if I don't send a body to the endpoint, I get a 402 as expected:
FWIW, I am able to dump the request details right before the call to
sendDirectResponse
in thehandlePaymentRequired
method, and I can see the body I'm expecting.Am I missing something in my request?