Homebrew RELEASE Lithium: Lightweight Easy to Use Title Installer for 7.X

protomouse

Well-Known Member
Newcomer
Joined
Feb 1, 2014
Messages
49
Trophies
0
Age
36
XP
493
Country
EDIT: Two seconds after I posted the below I figured out that when I rewrote the script that creates the index JSON, I made it send absolute URLs instead of relative ones. I changed that behavior back and things started working again.

Hi @blawar! I'm running into an issue I swear I've never seen before. I'm connecting to an HTTP site using basic auth. I'm serving up a JSON index for Lithium, and that works well. But when I grab one of the files, Lithium doesn't seem to set the Authorization header (or any of the other headers) and I get "Failed to open NSP":

Request
Code:
GET / HTTP/1.1
Host: example.com
Authorization: Basic ...
Accept: */*
Accept-Encoding: deflate, gzip
Theme: ...
UID: ...
Version: 12.1
Language: en
HAUTH: ...
UAUTH: ...


Response
Code:
HTTP/1.1 200 OK
Content-Length: 282
Date: Tue, 27 Jul 2021 14:42:17 GMT
Content-Type: application/json

{
  "files": [
    {
      "url": "http://example.com/path/to/file.nsp",
      "size": 422012489
    }
  ]
}


Request
Code:
GET /path/to/file.nsp HTTP/1.1
Host: example.com
Range: bytes=0-1048575
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.85 Safari/537.37
Accept: */*


Response
Code:
HTTP/1.1 401 Unauthorized
Content-Type: text/plain
Www-Authenticate: Basic realm="example"
Date: Tue, 27 Jul 2021 14:44:34 GMT
Content-Length: 17

401 Unauthorized

This used to work. Not sure if I was on an older version, but one thing that's definitely changed is that I'm handling authentication in Traefik instead of nginx.
 
Last edited by protomouse,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
    HiradeGirl @ HiradeGirl: Have a nice day. Life. Week. Month. year.