about summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
* config: allow overriding default prepended schemebptato2023-12-154-5/+19
|
* Implement local CGI error message handlingbptato2023-12-157-8/+44
| | | | | | This was documented, but not implemented until now. Also, improve the loader module's protocol documentation.
* cha-finger: proper error message outputbptato2023-12-151-6/+12
|
* ftp: fix unnecessary slashes being added to path; move bindings/curlbptato2023-12-157-29/+39
| | | | also in ftp: clean up resources before exit
* buffer: use BufferSize constantbptato2023-12-151-1/+1
|
* Set ishtml in the correct place, take ishtml on clonebptato2023-12-151-1/+2
|
* container: track ishtml statusbptato2023-12-152-1/+4
| | | | | This way we can at least view HTML source of x-htmloutput filtered buffers. TODO: make it render the actual source instead.
* charcategory: move out isDigitAsciibptato2023-12-143-6/+4
| | | | so we do not have to import unicode
* bonus: add libfetch HTTP backendbptato2023-12-142-0/+163
| | | | | | | It has roughly zero utility, but maybe it's a good demonstration of local CGI? (TODO: add libfetch FTP too, that might actually be useful.)
* socketstream, serversocket: portable bindUnixbptato2023-12-145-11/+51
| | | | | reimplementing it portably in Nim seems incredibly annoying, so we just use C
* client: nil check connectSocketStream resultbptato2023-12-141-0/+5
| | | | | It may fail if the buffer process could not successfully create a server socket.
* client: avoid nil defect in flushConsolebptato2023-12-141-0/+5
|
* config: do not override user-defined urimethodmapbptato2023-12-142-1/+6
| | | | UMM resolution takes the first entry.
* Makefile: add missing mkdir commandsbptato2023-12-141-0/+9
|
* Update readmebptato2023-12-141-1/+1
|
* fixed 'return' handling with 'yield' in 'for of' or with finally blocks ↵Fabrice Bellard2023-12-142-73/+121
| | | | (gihub ticket #166)
* fixed async generator in case of exception in the implicit await in the ↵Fabrice Bellard2023-12-141-9/+20
| | | | 'return' statement
* Fix AsyncGenerator.prototype.return error handling (bnoordhuis)Fabrice Bellard2023-12-141-4/+13
|
* raise an error if a private method is added twice to an objectFabrice Bellard2023-12-141-0/+6
|
* Makefile: add fwrapv to QJS buildbptato2023-12-141-1/+1
| | | | as done in upstream
* file: complain about hostnamebptato2023-12-141-0/+5
| | | | fixes error on reloading stdin
* chapath: add missing returnbptato2023-12-141-1/+2
|
* update todobptato2023-12-141-5/+7
| | | | | | | * better path handling done * empirically, we no longer crash on / -> M-c * LD_PRELOAD is good enough, especially now when the main binary no longer links to libcurl
* doc/config: finish path handling documentationbptato2023-12-141-1/+5
|
* Update doc/localcgibptato2023-12-141-3/+4
| | | | | multipart through local CGI is now supported as well. (also, fix Cha-Control description inaccuracy)
* loaderhandle: fix ConversionDefect in getFdbptato2023-12-131-2/+7
| | | | | We must save fd in the constructor, because the stream type may be changed while loading.
* Various fixesbptato2023-12-1314-102/+145
| | | | | | | * Makefile: fix parallel build, add new binaries to install target * twtstr: split out libunicode-related stuff to luwrap * config: quote default gopher2html URL env var for unquote * adapter/: get rid of types/url dependency, use CURL url in all cases
* http: use CURLU for URLsbptato2023-12-134-4/+103
|
* break up twtstr somewhatbptato2023-12-1320-382/+402
| | | | | Avoid computing e.g. charwidth data for http which does not need it at all.
* Move http out of main binarybptato2023-12-1325-358/+433
| | | | | | | | | | | | Now it is (technically) no longer mandatory to link to libcurl. Also, Chawan is at last completely protocol and network backend agnostic :) * Implement multipart requests in local CGI * Implement simultaneous download of CGI data * Add REQUEST_HEADERS env var with all headers * cssparser: add a missing check in consumeEscape
* Move gopher to adapter/bptato2023-12-128-181/+154
| | | | Also, move default urimethodmap config to res.
* Move out ftp: protocol; fix some local CGI bugsbptato2023-12-125-84/+86
|
* Move out file: protocol handling to adapter/bptato2023-12-125-51/+39
|
* adapter/: re-structurebptato2023-12-127-12/+12
|
* local CGI improvements, move data: to cgi-binbptato2023-12-128-61/+163
| | | | error codes are WIP, not final yet...
* twtstr: import functions from gopher2htmlbptato2023-12-122-32/+12
|
* cha-finger: use MAPPED_URI_*bptato2023-12-121-25/+15
| | | | | Much simpler & more efficient than the ugly regex parsing we used to have.
* local CGI: add mapped URI env vars; move about: to adaptersbptato2023-12-127-42/+68
| | | | | | | | | | | | | | | * Add MAPPED_URI_* as environment variables when a request is coming from urimethodmap It costs us compatibility with w3m, but it seems to be a massive improvement over smuggling in the URL as a query string and then writing an ad-hoc parser for every single urimethodmap script. The variables are set for every urimethodmap request, to avoid accidental leaking of global environment variables. * Move about: to adapters (an obvious improvement over the previous solution)
* layout: rounding error correction fixesbptato2023-12-111-2/+6
| | | | | * start from 1 * divide by total - 1, since we are counting the rounding error between each line
* Makefile: clean up libexecdir on uninstallbptato2023-12-111-2/+8
|
* doc/localcgi: reword/clarifybptato2023-12-111-1/+5
|
* bonus: add magnet.cgibptato2023-12-112-0/+78
|
* css: add case-insensitive matchingbptato2023-12-114-25/+103
| | | | Also case-sensitive, but for now that is the same as normal matching...
* css: add text-transformbptato2023-12-115-11/+321
| | | | | | | Probably not fully correct, but it's a good start. Includes proprietary extension -cha-half-width, which converts full-width characters to half-width ones.
* layout: do not resolve floats if grandparent position is resolvedbptato2023-12-101-2/+2
| | | | | | | | | | Instead, position them at the end of their block's layout pass. Without this, they could be positioned too early, as the grandparent's position being resolved does not guarantee that the parent's position has already been resolved as well. (Unlike the comment suggests, flushMargins is not appropriate there.)
* layout: fix rounding error correctionbptato2023-12-101-11/+8
| | | | | * Actually calculate rounding error * Skip a loop over lines by accumulating rounding error in finishLine
* Add support for gemini by default, update readmebptato2023-12-1010-37/+44
| | | | | No need to leave gemini support in the bonus folder. Still TODO: proxy support.
* mailcap: add $MAILCAP_URLbptato2023-12-103-5/+26
| | | | | | This is better than %u as it is backwards compatible (i.e. does not rely on other user agents doing whatever upon encountering an unknown substitution template.)
* Separate gopher conversion from main binarybptato2023-12-107-135/+224
| | | | | | | | | | | | | | | | | | | | | Now we use a (much simplified) gopher2html binary in libexec, instead of converting gopher directories to HTML in loader/gopher. This has two advantages: * Less ugly conversion logic in the loader module; we can just convert the file line by line. (The previous converter also had some correctness issues, that is fixed now as well.) * If the user desires, they can replace the gopher converter with another binary using the mailcap mechanism. The disadvantages are: * For now, source display is broken. This is a problem with all mailcap filters in general, and should be fixed in the future. (That said, the previous version also only displayed the converted HTML source, which was not really useful anyway.) * The proper directory structure is required for this to work; OTOH plenty of work has been done so that this is as frictionless as possible, so it should not really be a problem.
* Enable finger protocol by defaultbptato2023-12-107-12/+47
| | | | | | * Add a default urimethodmap that points finger: to cha-finger * Install cha-finger to /usr/local/libexec/cha/cgi-bin by default * cha-finger: use ALL_PROXY if given, die if curl is not installed