Change HttpClient to follow all redirects except HTTPS to HTTP.
Run language snippet tests with --no-cache and real PackageServer instead of pre-seeded cache. This increases HTTP test coverage and enables testing of package redirects.
Change PackageServer to return 301 for request paths starting with /HTTP301/ and 307 for request paths starting with /HTTP307/.
Update some outdated test package checksums that apparently weren't verified.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
## 📋 Pull Request Information
**Original PR:** https://github.com/apple/pkl/pull/328
**Author:** [@odenix](https://github.com/odenix)
**Created:** 3/17/2024
**Status:** ✅ Merged
**Merged:** 3/21/2024
**Merged by:** [@bioball](https://github.com/bioball)
**Base:** `main` ← **Head:** `redirect`
---
### 📝 Commits (1)
- [`3b533ba`](https://github.com/apple/pkl/commit/3b533ba1ac6565412277818680e43083dbb27597) Follow HTTP redirects
### 📊 Changes
**10 files changed** (+105 additions, -16 deletions)
<details>
<summary>View changed files</summary>
📝 `pkl-cli/src/test/kotlin/org/pkl/cli/CliProjectPackagerTest.kt` (+1 -1)
📝 `pkl-commons-test/src/main/kotlin/org/pkl/commons/test/InputOutputTestEngine.kt` (+20 -2)
📝 `pkl-commons-test/src/main/kotlin/org/pkl/commons/test/PackageServer.kt` (+13 -1)
📝 `pkl-core/src/main/java/org/pkl/core/http/JdkHttpClient.java` (+2 -0)
📝 `pkl-core/src/test/files/LanguageSnippetTests/input/packages/packages1.pkl` (+1 -1)
📝 `pkl-core/src/test/files/LanguageSnippetTests/input/packages/packages2.pkl` (+1 -1)
➕ `pkl-core/src/test/files/LanguageSnippetTests/input/packages/redirects.pkl` (+15 -0)
📝 `pkl-core/src/test/files/LanguageSnippetTests/output/packages/packages2.pcf` (+2 -2)
➕ `pkl-core/src/test/files/LanguageSnippetTests/output/packages/redirects.pcf` (+26 -0)
📝 `pkl-core/src/test/kotlin/org/pkl/core/LanguageSnippetTestsEngine.kt` (+24 -8)
</details>
### 📄 Description
- Change HttpClient to follow all redirects except HTTPS to HTTP.
- Run language snippet tests with --no-cache and real PackageServer instead of pre-seeded cache. This increases HTTP test coverage and enables testing of package redirects.
- Change PackageServer to return 301 for request paths starting with /HTTP301/ and 307 for request paths starting with /HTTP307/.
- Update some outdated test package checksums that apparently weren't verified.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/apple/pkl/pull/328
Author: @odenix
Created: 3/17/2024
Status: ✅ Merged
Merged: 3/21/2024
Merged by: @bioball
Base:
main← Head:redirect📝 Commits (1)
3b533baFollow HTTP redirects📊 Changes
10 files changed (+105 additions, -16 deletions)
View changed files
📝
pkl-cli/src/test/kotlin/org/pkl/cli/CliProjectPackagerTest.kt(+1 -1)📝
pkl-commons-test/src/main/kotlin/org/pkl/commons/test/InputOutputTestEngine.kt(+20 -2)📝
pkl-commons-test/src/main/kotlin/org/pkl/commons/test/PackageServer.kt(+13 -1)📝
pkl-core/src/main/java/org/pkl/core/http/JdkHttpClient.java(+2 -0)📝
pkl-core/src/test/files/LanguageSnippetTests/input/packages/packages1.pkl(+1 -1)📝
pkl-core/src/test/files/LanguageSnippetTests/input/packages/packages2.pkl(+1 -1)➕
pkl-core/src/test/files/LanguageSnippetTests/input/packages/redirects.pkl(+15 -0)📝
pkl-core/src/test/files/LanguageSnippetTests/output/packages/packages2.pcf(+2 -2)➕
pkl-core/src/test/files/LanguageSnippetTests/output/packages/redirects.pcf(+26 -0)📝
pkl-core/src/test/kotlin/org/pkl/core/LanguageSnippetTestsEngine.kt(+24 -8)📄 Description
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.