Commit Briefs

Stefan Sperling

redo "got-fetch-http: fix GET request URL", without breaking tests

My previous fix for ~user in SSH URLs broke ~user in HTTP URLs, as used on sourcehut. Sanitize the amount of leading and embedded slashes in URLs to make things work in all cases. The root cause of the test problem with naddy's previous diff was likely in the http-server script itself, where a request like GET //repo//info/refs?service=git-upload-pack somehow ended up as GET $testroot///info/refs. We work around this here by avoiding the double slashes.


Tobias Heider

Use got_pkt_readlen() to parse pkt-lens.


Tobias Heider

Rewrite got-fetch-http I/O using bufio API. This should help make the

code more portable supports almost everything we need out of the box. pledge needs the rpath promise because of libtls. This was technically also the case with the old API but we didn't actually enable pledge thanks to DEBUG_HTTP. The synchronous bufio wrappers should probably move to lib/bufio.c in the future. ok and feedback from op@


Tobias Heider

Rename got-http helper to got-fetch-http to match naming scheme.

We aren't planning to support sending anyway. ok stsp@