summaryrefslogtreecommitdiff
path: root/Userland/pro.cpp
AgeCommit message (Collapse)Author
2020-06-13ProtocolServer+LibProtocol: Propagate HTTP status codes to clientsAndreas Kling
Clients now receive HTTP status codes like 200, 404, etc. Note that a 404 with content is still considered a "successful" download from ProtocolServer's perspective. It's up to the client to interpret the status code. I'm not sure if this is the best API, but it'll work for now.
2020-05-30pro: Show download progress in the terminal window if available :^)Andreas Kling
2020-05-03ProtocolServer: Pass HTTP response headers to the clientAndreas Kling
We now store the response headers in a download object on the protocol server side and pass it to the client when finishing up a download. Response headers are passed as an IPC::Dictionary. :^)
2020-05-03ProtocolServer: Implement and handle download progressAnotherTest
Also updates `pro` to display download progress and speed on stderr
2020-04-04ProtocolServer+LibProtocol: Reject unhandled URLs instead of assertingAndreas Kling
StartDownload requests for unhandled protocols (or invalid URLs) will now refuse to load instead of asserting. A failure code is sent back to LibProtocol and Protocol::Client::start_download() returns nullptr. Fixes #1604.
2020-02-06LibCore: Remove leading C from filenamesAndreas Kling
2020-02-05LibProtocol: Rename namespace LibProtocol => ProtocolAndreas Kling
2020-02-02LibCore: Put all classes in the Core namespace and remove the leading CAndreas Kling
I've been wanting to do this for a long time. It's time we start being consistent about how this stuff works. The new convention is: - "LibFoo" is a userspace library that provides the "Foo" namespace. That's it :^) This was pretty tedious to convert and I didn't even start on LibGUI yet. But it's coming up next.
2020-01-18Meta: Add license header to source filesAndreas Kling
As suggested by Joshua, this commit adds the 2-clause BSD license as a comment block to the top of every source file. For the first pass, I've just added myself for simplicity. I encourage everyone to add themselves as copyright holders of any file they've added or modified in some significant way. If I've added myself in error somewhere, feel free to replace it with the appropriate copyright holder instead. Going forward, all new source files should include a license header.
2020-01-01AK: Move the userspace SharedBuffer from LibC to AKAndreas Kling
This always felt out-of-place in LibC.
2019-11-24LibProtocol: Add a Download object so users don't have to manage ID'sAndreas Kling
LibProtocol::Client::start_download() now gives you a Download object with convenient hooks (on_finish & on_progress). Also, the IPC handshake is snuck into the Client constructor, so you don't need to perform it after instantiating a Client. This makes using LibProtocol much more pleasant. :^)
2019-11-23pro: Take the URL to download as a command-line argumentAndreas Kling
Also, don't print anything other than the download payload to stdout. This gives us a very simple HTTP download utility :^)
2019-11-23ProtocolServer: Send the download payload to clients as a shared bufferAndreas Kling
The DownloadFinished message from the server now includes a buffer ID that can be mapped into the client program. To avoid prematurely destroying the buffer, the server will hang on to it until the client lets it know that they're all good. That's what the ProtocolServer::DisownSharedBuffer message is about. In the future it would be nice if the kernel had a mechanism to allow passing ownership of a shared buffer along with an IPC message somehow.
2019-11-23pro: Add a little userland utility for testing ProtocolServerAndreas Kling