SerenityOS / serenity

The Serenity Operating System 🐞
https://serenityos.org
BSD 2-Clause "Simplified" License
30.28k stars 3.17k forks source link

LibWeb: Compatible with ChatGPT #22143

Open awesomekling opened 9 months ago

awesomekling commented 9 months ago

We should figure out what's missing for ChatGPT compatibility and implement it.

https://chat.openai.com/

At the moment, we're not even passing the Cloudflare turnstile challenge (at least not where I'm connecting from)

ADKaster commented 8 months ago

The last I looked at this, we failed to load a blob url in a worker. It also complained about cookies.

Both of which sound like things @Lubrsi is familiar with ;)

Lubrsi commented 8 months ago

Commenting out this code makes it no longer complain about enabling cookies: https://github.com/SerenityOS/serenity/blob/6b79508c08abaef3da3717e250993d622af65b6e/Userland/Libraries/LibWebView/CookieJar.cpp#L320-L331 cc @trflynn89

Lubrsi commented 8 months ago

The last I looked at this, we failed to load a blob url in a worker.

With our process architecture for workers (being in a separate process), we'll have to follow spec and implement blob URLs as a global user agent store (i.e. in the browser process)

trflynn89 commented 8 months ago

Commenting out this code makes it no longer complain about enabling cookies:

Looks like cookie.domain is the empty string, and is_public_suffix(<empty string>) always returns true.

The public suffix list uses AK::Trie to store its data. Seems like the construction of that thing is more or less copy-pasted from TestTrie.cpp:

https://github.com/SerenityOS/serenity/blob/6e19ab2bbce0b113b628e6f8e9b5c0640053933e/Tests/AK/TestTrie.cpp#L14-L20

That test trie also successfully "finds" an empty string. Is that expected with the trie? Or are we constructing the trie wrong?

shannonbooth commented 3 months ago

image Looks like it is working for me - although login is problematic for me still.