Commit Graph

15 Commits

Author SHA1 Message Date
Stephen Heumann
65c6c68936 HTTP header parsing tweaks.
These should slightly improve performance.
2018-10-08 21:18:32 -05:00
Stephen Heumann
6f5f57c422 Support spaces in URLs.
This applies to both directly entered URLs and redirects. At least some servers (e.g. bit.ly) will send un-percent-encoded URLs that may contain spaces in the Location header.

Spaces are now percent-encoded in the HTTP request. Other characters that should be percent-encoded still aren't, but I think many servers can accept them as-is.
2018-10-03 17:40:08 -05:00
Stephen Heumann
314f408b5e Report a disk switch if the length of the file changed.
Currently, the logic for this doesn't re-detect the file type, and it may not work correctly with some 2mg files, but it should work in most cases.
2018-10-01 18:18:34 -05:00
Stephen Heumann
10cb54df5f Give meaningful error messages. 2018-09-26 00:17:31 -05:00
Stephen Heumann
d30dfd8631 Before sending a request, check if the remote side has closed the connection.
This avoids sending out requests that can't work, and also gives an opportunity to process packets from the old connection while it's still logged in, which may avoid some strange behavior.
2018-08-14 18:35:11 -05:00
Stephen Heumann
8b09d6bb7d Switch to using a struct for the MountURL DControl call.
This allows us to return a better error code and provides for future extensibility.
2018-08-12 18:45:08 -05:00
Stephen Heumann
610a638e5c Switch to unified set of error codes. Also, do more checks for 2IMG files. 2018-08-11 01:53:53 -05:00
Stephen Heumann
ff538de39c Add basic infrastructure for an installable GS/OS driver.
Currently, this can install the DIBs from the driver, but no driver calls are implemented.
2018-08-06 20:22:33 -05:00
Stephen Heumann
cb236fbeb3 Set up framework of the NetDisk init. 2018-08-05 18:04:34 -05:00
Stephen Heumann
9883d47517 Support retrying when reading from the TCP connection gives an error.
This is often what will happen if the server has terminated the connection (which many servers will do after a short time, e.g. one second).
2018-08-03 19:50:59 -05:00
Stephen Heumann
a485918d44 Small refactoring. 2018-08-01 01:53:49 -05:00
Stephen Heumann
179c0afe56 Support for HTTP redirects. 2018-08-01 01:37:22 -05:00
Stephen Heumann
133c7f17b1 Add code to parse status line and headers of an HTTP response to our request. 2018-08-01 00:05:19 -05:00
Stephen Heumann
28a0b1be19 Add and use code to parse URLs specifying the resource. 2018-07-30 21:35:45 -05:00
Stephen Heumann
ef272cb998 Initial code implementing some of the core functionality for reading blocks over HTTP. 2018-07-29 23:40:03 -05:00