• src/syncterm/webget.c

    From Deucе@VERT to Git commit to main/sbbs/master on Fri Jan 24 10:26:45 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/619fa0809a259b3ceff5e274
    Modified Files:
    src/syncterm/webget.c
    Log Message:
    Fix warnings and errors on Windows.

    Apparently, Windows doesn't have a MSG_DONTWAIT flag to recv().

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Fri Jan 24 10:30:29 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/88ffba7b58207ddf04cc83c1
    Modified Files:
    src/syncterm/webget.c
    Log Message:
    include more stuff for asprintf() and timegm() on Windows

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Fri Jan 24 20:59:25 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/a6a2acd4dbb0b10d7b13f8fc
    Modified Files:
    src/syncterm/webget.c
    Log Message:
    Do all the caching, chunking, and fetching stuff.

    This should now be ready for use... it will not connect if the data
    is still fresh (default freshness period is one day), and will use If-Modified-Since and If-None-Match conditions depending on the
    cached data as well.

    All that's left is configuring it, fetching the lists, and loading them.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Fri Jan 24 21:10:24 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/f3205b598c5be0466ba7786f
    Modified Files:
    src/syncterm/webget.c
    Log Message:
    Fix duplicate data in cacheinfo file

    Since the cache file is opened for append, truncate it before calling iniWriteFile(). This isn't create because if it fails, it will
    leave the file empty, which will cause the next time this function
    is called to do a full request, but at least if fails safe.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Mon Jan 27 11:02:22 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/1ed289aa00b6ea9e6b1e3751
    Modified Files:
    src/syncterm/webget.c
    Log Message:
    Initialize sess->sock

    INVALID_SOCKET != 0, so this potentially ended up closing stdin
    and breaking ANSI and Curses modes.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Mon Jan 27 22:14:51 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/f52d7c5fffb0fee60cb6491f
    Modified Files:
    src/syncterm/webget.c
    Log Message:
    Fix WITHOUT_CRYPTLIB

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Tue Jan 28 20:14:43 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/a8d81858539f5f6cbbec8649
    Modified Files:
    src/syncterm/webget.c
    Log Message:
    Whoops, add the string

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Wed Jan 29 20:00:07 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/5e9cb20e413734269b92ebcf
    Modified Files:
    src/syncterm/webget.c
    Log Message:
    Attempt to silence Coverity a bit harder

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Wed Jan 29 20:57:22 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/44b28f37e972a64303bc80b0
    Modified Files:
    src/syncterm/webget.c
    Log Message:
    More suppressions

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Fri Jan 31 20:55:47 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/f9f1a16aca63414976f1f0ca
    Modified Files:
    src/syncterm/webget.c
    Log Message:
    fclose() newfile before renaming.

    Thanks Microsoft!

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Fri Jan 31 21:46:04 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/ccd79befa64862721637b1bd
    Modified Files:
    src/syncterm/webget.c
    Log Message:
    Fix header parsing...

    content-length: and content-transfer-encoding: were badly broken.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Fri Jan 31 22:31:55 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/4f6fb2b4a1c13270996b0acc
    Modified Files:
    src/syncterm/webget.c
    Log Message:
    Add an use new strtou?ll?() wrappers in webget.c

    This is kind of a prototype for xpdev... but it's a bit klunky.

    The issue these fix is that some C libraries (Windows and GLibC)
    will return 0 and leave errno unset when no digits are converted,
    while other libraries (FreeBSD and musl) will set errno if no
    digits are converted. This means that even setting errno to zero
    before calling, then checking it if the return value is zero is
    not enough to catch errors.

    This actually led to Windows and (most) Linux systems not being able
    to download the web lists because of a bug where it was converting
    starting in the middle of the string rather than where the numbers
    are. It worked fine on Alpine Linux and FreeBSD though.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Fri Jan 31 22:34:15 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/d1863a4ea9157b103b202d29
    Modified Files:
    src/syncterm/webget.c
    Log Message:
    Remove extra set of errno.

    We don't need this anymore because the paranoid wrapper does it.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Sat Feb 1 15:35:48 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/bd8f2626644c8f504d6c23de
    Modified Files:
    src/syncterm/webget.c
    Log Message:
    Fix webget of chunked responses

    Broken with the paranoid_strtoul() addition

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Sun Feb 2 10:08:34 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/62b85ae6f3af58ff35dd8c5d
    Modified Files:
    src/syncterm/webget.c
    Log Message:
    It appears the Windows won't allow rename()ing a file over top
    of an existing one.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Fri Feb 7 16:38:22 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/c35aa0bcc2e5fb6a073fd945
    Modified Files:
    src/syncterm/webget.c
    Log Message:
    Fix two (more) bugs with Web Lists

    1 - If cache-control header had more than one option, an infinite
    loop would occur.
    2 - For TLS, if the remote closes the connection after the transfer,
    a "Complete" error would occur.

    Together, these should fox ticket 191

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Fri Feb 7 16:43:43 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/84c4814adb579f84cd7d34b2
    Modified Files:
    src/syncterm/webget.c
    Log Message:
    Terminate header parsing loop on \n as well as \r

    With the latest change, *val will be \n after the last item, so
    this avoids an extra loop through the loops.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Fri Feb 7 16:59:01 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/0985260eb2c0803799e77378
    Modified Files:
    src/syncterm/webget.c
    Log Message:
    Fix chunked transfer encoding of web lists

    It's Transfer-Encoding:, not Content-Transfer-Encoding:, and each
    chunk has a \r\n appended to it.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Sat Feb 8 12:15:45 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/3676d09ad407454b2ed15944
    Modified Files:
    src/syncterm/webget.c
    Log Message:
    Fix memory leak in read_chunked()

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Sun Feb 9 16:23:13 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/acef5f71018165db1152a71a
    Modified Files:
    src/syncterm/webget.c
    Log Message:
    Fix harmless Coverity issue.

    There's no need to set line = NULL since it's always overwritten.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net
  • From Deucе@VERT to Git commit to main/sbbs/master on Tue Feb 11 11:28:02 2025
    https://gitlab.synchro.net/main/sbbs/-/commit/9b53f469ea3e28e75e7eb35f
    Modified Files:
    src/syncterm/webget.c
    Log Message:
    Fail to parse https:// URIs when cryptlib is disabled

    No point in going any further and confusing users.

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net