• http.js wont follow urls if Location is lowercase

    From Nigel Reed@1:103/705 to GitLab issue in main/sbbs on Fri Nov 24 04:40:59 2023
    open https://gitlab.synchro.net/main/sbbs/-/issues/675

    in HTTPRequest.prototype.Get

    ~~~
    if ([301, 302, 307, 308].indexOf(this.response_code) > -1
    && this.follow_redirects > 0
    && this.response_headers_parsed.Location
    && this.response_headers_parsed.Location.length
    ~~~

    This only works if Location in the header is uppercase.

    Unfortunately, some BBC sites return "location" with lowercase.

    As a workaround, I'm forcing the first character of M in HTTPRequest.prototype.ReadHeaders=function()

    to be uppercase

    ~~~
    if (m) {
    m[1] = m[1].charAt(0).toUpperCase() + m[1].slice(1); ~~~

    I'm not sure if this is the proper fix, but I'm not sure how you would do a case insensitive match on
    this.response_headers_parsed.Location

    I'll leave it to the experts to determine the proper fix.
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From echicken@1:103/705 to GitLab issue in main/sbbs on Fri Nov 24 06:15:21 2023
    close https://gitlab.synchro.net/main/sbbs/-/issues/675
    --- SBBSecho 3.20-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)