Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firefox stalls on redirect to CAS #441

Open
Maulinuxops opened this issue Jul 9, 2024 · 1 comment
Open

Firefox stalls on redirect to CAS #441

Maulinuxops opened this issue Jul 9, 2024 · 1 comment

Comments

@Maulinuxops
Copy link

Maulinuxops commented Jul 9, 2024

Hi, phpCAS v1.6.0 as supplied with moodle v4.1.4 here.

It seems that the redirect to the CAS auth page obtained at URL http://moodle.server/login.php?authCAS=CAS makes Firefox stall waiting for page content; Chrome changes URL immediately without delay instead.

The reply sent by the server is as follows:

HTTP/1.1 302 Found
< Server: nginx/1.18.0 (Ubuntu)
< Date: Tue, 09 Jul 2024 09:12:22 GMT
< Content-Type: text/html; charset=utf-8
< Transfer-Encoding: chunked
< Connection: keep-alive
< Set-Cookie: MoodleSession=xxxxxxxxxxx; path=/
< Expires: Thu, 19 Nov 1981 08:52:00 GMT
< Cache-Control: no-store, no-cache, must-revalidate
< Pragma: no-cache
< Location: https://cas.server/cas/login?service=http%3A%2F%2Fmoodle.server%2Flogin%2Findex.php%3FauthCAS%3DCAS&gateway=true
< Set-Cookie: NSC_XXXX_XXXXXXXXXXXX_XXXX=xxxxxx;expires=Tue, 09-Jul-2024 11:11:54 GMT;path=/;secure;httponly
< Strict-Transport-Security: max-age=157680000

Since the connection is keep-alive and the transfer is chunked Firefox is likely waiting a content that never arrives.

Is this a moodle issue or a phpCAS issue? How can I change the Connection header to "Connection: close", which seems to fix this issue?

Thanks a lot in advance for support!

P.S.: adding a "Content-Length: 0" header should also work

@Maulinuxops
Copy link
Author

The following patch for v1.6.0 seems to fix the issue

phpCAS_Client.php.diff.gz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant