Skip to content

http: extract url module, add redirect support, and fix host header#50

Merged
findstr merged 1 commit into
masterfrom
http/client
May 10, 2026
Merged

http: extract url module, add redirect support, and fix host header#50
findstr merged 1 commit into
masterfrom
http/client

Conversation

@findstr
Copy link
Copy Markdown
Owner

@findstr findstr commented May 4, 2026

  • Extract URL parsing/encoding from helper into net.http.url module
  • Implement HTTP redirect following (301/302/303/307/308) with loop detection
  • Add client.close() to gracefully shut down pooled connections
  • Fix host header duplication: h1/h2 now inject Host/:authority from URL authority without modifying the user's header table
  • Add tests for host header deduplication in h1 and h2

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 74555db0d3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread lualib/silly/net/http/client.lua Outdated
Comment thread lualib/silly/net/http/client.lua
@codecov
Copy link
Copy Markdown

codecov Bot commented May 4, 2026

Codecov Report

❌ Patch coverage is 86.84932% with 48 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
lualib/silly/net/http/client.lua 82.11% 27 Missing ⚠️
lualib/silly/net/http/h1.lua 86.95% 9 Missing ⚠️
lualib/silly/net/http/url.lua 93.06% 7 Missing ⚠️
lualib/silly/net/websocket.lua 76.19% 5 Missing ⚠️

📢 Thoughts on this report? Let us know!

@findstr findstr force-pushed the http/client branch 4 times, most recently from 22a57ae to b53b636 Compare May 5, 2026 10:40
@findstr
Copy link
Copy Markdown
Owner Author

findstr commented May 9, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b53b636735

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread lualib/silly/net/http/h1.lua
Comment thread lualib/silly/net/http/url.lua Outdated
@findstr findstr merged commit 2831782 into master May 10, 2026
13 checks passed
@findstr findstr deleted the http/client branch May 10, 2026 10:35
- Extract URL parsing/encoding from helper into net.http.url module
- Implement HTTP redirect following (301/302/303/307/308) with loop detection
- Add client.close() to gracefully shut down pooled connections
- Fix host header duplication: h1/h2 now inject Host/:authority from URL
  authority without modifying the user's header table
- Add tests for host header deduplication in h1 and h2
- read/readall now use a single deadline timer instead of per-read
  timeouts, eliminating timeout amplification for chunked/content-length
  responses.
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

Successfully merging this pull request may close these issues.

1 participant