Commits
- Commit:
a3844d7a3c9a386d7bc73fb0152fa714533a7e91
- From:
- Omar Polo <op@omarpolo.com>
- Date:
got-fetch-http: be pedantic with the error checking
these functions are expected to return -1 on failure, be strict
about it.
- Commit:
a46b549764762c6d1ef465471d38ed2d5e152543
- From:
- Omar Polo <op@omarpolo.com>
- Date:
fix function name in error message (again)
- Commit:
45c5bd12280f38df8ce2cf82d06beeb15ed80aca
- From:
- Omar Polo <op@omarpolo.com>
- Date:
fix function name in error message
- Commit:
0bd5fb752a05f0d096e2d9d0d11e1b02b4804849
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
fix wrong errno check in bufio_close_sync()
ok thomas_adam, op@
- Commit:
60ac05357c165b2b9aa4836616db21eeaa4211ea
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
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.
- Commit:
fe55fe41ebae13ff135eb0041f19a224015cbf29
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Date:
got-fetch-http: backout GET request URL fix
It broke the clone regression test.
- Commit:
1db91dc77e5551d8955120674296a29d7820a483
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Date:
got-fetch-http: fix GET request URL
Add a leading '/' and do not produce a double "//" after the path.
ok op
- Commit:
a0769bb1e683876bd26ba4c2cc83e3e35db8111f
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
fix got-fetch-http when chunked encoding is not used
We would end up raising a spurious error when the server had no more data
to send and would abort the clone operation, while everything was fine in
fact.
Problem reported by vazub via IRC, thanks!
- Commit:
21679dc5afe28d00d3188bb529f3cefffdb06b64
- From:
- Tobias Heider <me@tobhe.de>
- Date:
Use got_pkt_readlen() to parse pkt-lens.
- Commit:
d7988696a5b1d45dfb72b7c44fd7647389b3432b
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
make got-fetch-http pass "done\n" through rather than faking it
Without this we exit the loop early and got-fetch-pack sees unexpected
end-of-file on stdout trying to write its final "done\n" message.
ok op@
- Commit:
44740114875c96dd82e588aab0025e97c25d3997
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
fix previous; pledge("stdio") must wait until after the TLS handshake
- Commit:
29b6cbbaee05814fbac85312d69ee8ec76c92d82
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
use pledge("stdio") late in got-fetch-http, currently as early as possible
- Commit:
c4caaee88e58b02fae4d446ceb99147ed9ed3b0e
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
remove dead code under DEBUG_HTTP; ok op@
- Commit:
e845266448678a874b53e7f9e0d16988815c2c92
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
use unveil to restrict filesystem access of got-fetch-http
With HTTPS we only need to be able to read /etc/ssl/cert.pem.
With plaintext HTTP no filesystem access is needed at all.
- Commit:
625c83c97f21ca7f19e430bc35a05a666c8824bf
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
can drop "rpath" pledge in got-fetch-http if plaintext HTTP is being used
- Commit:
18c37abb9e744da66fee2a2417d0ee132d05aed7
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
ensure that a pkt-line fits into read buffers used by got-fetch-http
- Commit:
4c09484283aa20854c6ae8e08e6b6f5ba5ff32f7
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
add missing \n to got-fetch-http debug output
- Commit:
fe08c8a762cda56356f90cbe27c11f4617b7e450
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
revert my previous two commits because they broke clone over http
- Commit:
bcf7cd444a9e9057ce6f48cfb03573b4972d7559
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
make got-fetch-http get_refs() understand when packet lines end
Previously it would only exit the loop when reading failed.
ok tobhe@
- Commit:
fd1b27119fe0bafd2e0b5ee26e877c742edfeb0e
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
log pkt lines read and written by got-fetch-http, in verbose mode
- Commit:
b1ebf3b36ff38d95f3c552bcddb2ad4c3e910d06
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
add comments to the HTTP fetching process which clarify how it works
- Commit:
7457011ad491370bd5ae4cbd56c4065715659fc0
- From:
- Tobias Heider <me@tobhe.de>
- Date:
Remove some dead code
- Commit:
4c3169974bebdf5072ad0f7974f68db8676c644c
- From:
- Tobias Heider <me@tobhe.de>
- Date:
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@
- Commit:
fe24f0a37093d812e8f7eb29a626a6d3f0b92aea
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
improve got-fetch-http request/response logging in verbose mode
- Commit:
ad3b5b58b098ef83ec0c06619a6cb3272a74bcf5
- From:
- Tobias Heider <me@tobhe.de>
- Date:
Rename got-http helper to got-fetch-http to match naming scheme.
We aren't planning to support sending anyway.
ok stsp@