Commit Graph

17 Commits

Author SHA1 Message Date
Bobbi Webber-Manners
95615458aa Rebased on latest IP65. Needs latest CC65 to build. 2022-09-14 13:02:41 -04:00
Oliver Schmidt
b18d657753 Don't trash parameter in AX. 2018-12-09 19:49:30 +01:00
Oliver Schmidt
6a296b2058 Improved URL selector handling.
parse_url stores the URL selector in the output_buffer - which is currently 520 bytes. A new entry point called parse_url_buffer was added which instead stores the URL selector in a buffer provided by the user.

url_download now calls the new parse_url_buffer instead of parse_url. The buffer for the URL selector is simply the download_buffer. So the download_buffer is used twice: First to hold the URL selector to be sent as request to the server and then to hold the response received from the server.

However, the URL selector still can't exceed the MSS (aka 1460 bytes).

Note: The User-Agent string was shortened by two bytes as that allows a "default" URL (incl. 'http://' but without port number) of exactly 1400 bytes to end up as 1460 bytes URL selector.
2018-11-13 13:19:47 +01:00
Oliver Schmidt
41de6a76bd Allow URLs and URL selectors > 255 chars.
Note: The URL selector is stored in the output_buffer - which is currently 520 bytes. Beside all of the URL (apart from a potential "http://") the 'get' and the 'http_preamble' have to fit into that buffer. Therefore URLs mustn't exceed 450 chars. However, we omit a check to avoid further code size increase as most of the time URLs are known to be much shorter anyhow. If the URLs might become large we just leave it up to the user to check their length.
2018-10-30 22:02:47 +01:00
Oliver Schmidt
fc61ee5358 Fixed recent change.
Brought back re-initialization of port hi-byte.
2018-08-03 00:49:56 +02:00
Oliver Schmidt
74eec87860 Improved handling of abbreviated URLs.
- There was already an explicit code path for something like 'wwww.google.com/' but that code path ended up with the protocol type unset and the port set to 0. Now the protocol defaults to HTTP and the port defaults to 80.
- There was no provision for something like http://www.google.com', rather it was just assumed that the slash after the hostname is always found. Now there's a check if the slash is actually found, and if it isn't found then an empty path is explicitly used.
2018-08-03 00:46:17 +02:00
Oliver Schmidt
4ef85827db Replaced version file with hard coded identifier.
Have the HTTP client work in just the same way the HTTP server does.
2018-08-01 19:00:39 +02:00
Oliver Schmidt
c47a89ce1a Split url.s into url.s and download.s.
url_parse() doesn't require TCP so it makes sense to allow a program using url_parse() to link successfully without TCP support.
2018-07-22 19:22:57 +02:00
Oliver Schmidt
3fb437f7cb Added C interface to URL functions. 2018-07-20 18:12:51 +02:00
Oliver Schmidt
d4f7569278 Removed last KPR_* constants. 2018-02-23 16:41:33 +01:00
Oliver Schmidt
c89a2ae1ba Adjusted include file extension to ca65 practice. 2018-02-23 16:36:05 +01:00
Oliver Schmidt
b84527c8a3 Removed last KIPPER leftover. 2018-02-23 16:33:21 +01:00
Oliver Schmidt
3c88dec698 Removed unused stuff. 2018-02-23 15:53:03 +01:00
Oliver Schmidt
2ae35b34d9 Replaced custom zeropage variables with cc65 default zeropage variables. 2014-07-07 20:56:21 +02:00
Oliver Schmidt
2cc72c406d Removed several custom segments. 2014-04-27 18:59:58 +02:00
Oliver Schmidt
e54bb71bcc General source code cleanup.
- Tab chars were partially used with the unusual width of two blanks. I removed them altogether.
- Line endings were inconsistent even iniside individual files. I normalized them.
- I introduced a consistent coding style regarding comment indenting and blank line usage.
- I removed trailing spaces.
- I removed newlines following unnamed labels.
- ...
2013-12-27 14:57:56 +01:00
Oliver Schmidt
ecdaac2ff8 Distilled IP65 out of NETBOOT65. 2013-12-13 22:24:03 +01:00