lunduniversity / introprog

Teaching material for "Introduction to Programming using Scala" at Lund University, LTH. http://cs.lth.se/pgk/
142 stars 176 forks source link

w12extra: wrong URL to course site #621

Closed sadphi closed 2 years ago

sadphi commented 2 years ago

The URL in w12 exercise 3a is incorrect, which means that the wrong data is fetched. The URL in the compendium is https://cs.lth.se/pgk/lthkurser, and when running the code in the REPL instructions, data will be equal to

val data: String =
<html>
<head><title>302 Found</title></head>
<body>
<center><h1>302 Found</h1></center>
<hr><center>nginx/1.20.1</center>
</body>
</html>

This is due to the URL redirecting to https://fileadmin.cs.lth.se/pgk/lthkurser201819.txt. Replacing the URL with the latter gives the expected result.

bjornregnell commented 2 years ago

PR welcome to avoid redirect. (I'm not sure how to do fromURL to bypass the redirect)

sadphi commented 2 years ago

Created PR #624 with a fix

sadphi commented 2 years ago

This was partly solved in PR #624. However, it will probably break when a new snapshot is released. Closing the issue though since it most likely requires a fix in the backend.