[PR #328] [MERGED] Follow HTTP redirects #502

Closed
opened 2025-12-30 01:24:59 +01:00 by adam · 0 comments
Owner

📋 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: mainHead: redirect


📝 Commits (1)

📊 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

  • 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>
adam added the pull-request label 2025-12-30 01:24:59 +01:00
adam closed this issue 2025-12-30 01:24:59 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pkl#502