Closed jaybeaton closed 2 months ago
Awesome catch. I handled it a little bit differently (in that second block you noted there's now a condition that catches if we're posting with no args) but this issue is resolved as of v2.0.4.
That solution seems to work with my old curl, too. Thanks!
With an older version of curl, a call to
com.atproto.server.refreshSession
was always failing with a400 Bad Request
response. These were the response headers:Some debugging showed that curl was never actually making the call to the remote server-- it was just immediately throwing that error. The issue was that curl was set to make a POST request, but
CURLOPT_POSTFIELDS
was not set.Making this change fixed the issue:
This change did not affect a POST with actual data (e.g.
BlueskyApi::startNewSession()
) becauseCURLOPT_POSTFIELDS
is set later with actual values by this:I'm not sure what exactly what versions of curl will have problems, but this is the version on my server that was failing (from 2013!):
This version worked fine as it was:
So, it appears that you can make this change to support older versions of curl without causing any issues on newer versions.