This is causing issues for me with the orbital-sync library, but I suspect it's also causing issues for me with uploading the teleporter zip files - they fail to upload about 90% of the time, sometimes randomly succeeding.
I suspect it's to do with the server not supporting the transport padding, but I need to do some more testing.
filter with ip.dst == 192.168.0.98 and tcp[80] and http.request.method == POST - none have got transport padding between the ending boundary -- and the CRLF.
The expected encoding is indeed multipart/form-data for your payload as specified in our OpenAPI specs. I will try to find some time tomorrow to test wit your particular file. However, I use Teleporter nearly on a daily basis during v6 development and haven't had a single issue. Do you also see similar uploading issues when using the web interface? If not, what is the difference?
edit Just in case this is useful for you, this is how my Python script does it with 100% success rate:
with requests.post(url = self.api_url + "/api/teleporter", files = {"file": ('teleporter.zip', teleporter_archive, 'application/zip')}, headers=self.headers) as response:
return response.json()
where teleporter_archive is the ZIP archive in memory (bytes).
Web interface is fine. See the linked GitHub issue on civitweb - browsers (or at least Chrome / Edge) add CRLF to the end of the last boundary, whereas node-fetch doesn't.
And sorry - yes I do get some issues using the web interface, but I think there's a race condition in some file creation going on, I'm still investigating that. The web interface issues (for me) are unrelated to this HTTP issue
Sorry, life's been quite hectic the last few days. The procedure is: once they push a release, we import it. We have a couple of patches against the last release which I always wanted to submit against CivetWeb. Not all of them are applicable for general audience, so some will remain in our realm. There is also a rather experimental fix
but it is not a complete fix - it only fixes Lua server pages (the only ones really relevant to Pi-hole). It fixes 404 Pages (sometimes?) respond with a 200 HTTP status. I may submit it partially and leave the rest to them, it's pretty straightforward. In an ideal world, I should have time later today but ... let's say: wel'll see.
Once we have also put the Pi-hole patches in, we can have a look how/when to update the embedded CivetWeb. IMO it'd be cleaner to wait for a release, could maybe argue that it's time for another one. If they refuse this for incomprehensible reasons, we can think about migrating to their master head.
@timtjtim You can go ahead and try the new FTL branch update/civetweb using
pihole checkout ftl update/civetweb
which - you already guessed from its name - updates CivetWeb inside FTL to the lastest master tip of the upstream project. You may have noticed that this triggered four PRs in the CivetWeb repository so it was worth it also for them. The last one changes something I have only noticed because of your recent changes to the forms code.