`http_fetch`: no row sends a request through a proxy

Đang mở
#2,395 4 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
54/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
c, python
Lĩnh vực
networking, testing

Hướng nghiên cứu

Start with tests/test_http_fetch.py and the implementation of http_fetch and http_post, then compare proxy behavior with what the curl library does directly. Add coverage for HTTP proxy requests and HTTPS CONNECT responses, including status, headers, body, and header line limits; decide whether to retain Proxy-Connection: Keep-Alive and document it in docs/BUILTINS.md if retained. Done when the proxy tests pass on each library release used by the gates.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

area:gates area:http kind:gate-defect

The bar of #2375 says that the curl library's own handling of the proxy variables applies to http_fetch and http_post. Three of its sentences stand on that path: a request that goes through a proxy "is written the way the library writes it for a proxy"; the lines of a proxy's answer to CONNECT count against the limit on answer header lines; and that answer is not the final response. Every row of tests/test_http_fetch.py runs with the proxy variables unset, so no test runs any of the three.

Run by hand through the library alone, with a proxy on a raw socket that answers CONNECT with HTTP/1.1 200 Connection established and X-P: 1 (2026-11-17, curl 8.5.0, 8.14.1 and 8.18.0, the same on each):

code=0   b'HTTP/1.1 200 Connection established\r\n'
code=0   b'X-P: 1\r\n'
code=0   b'\r\n'
code=404 b'HTTP/1.1 404 Not Found\r\n'
code=404 b'X-A: 1\r\n'
...

So the library hands the lines of the proxy's answer to the same header callback as every other header line, and reports the response code 0 for them (CURLINFO_RESPONSE_CODE); the origin's code comes only with the origin's lines. Through a proxy the library also writes a Proxy-Connection: Keep-Alive of its own.

Done when

  • A row sends an http:// request through a listener named in http_proxy and checks what the proxy receives against what the library writes for a proxy (asked of the library directly).
  • A row sends an https:// request through a listener that answers CONNECT with header lines of its own: the program gets the origin's answer (status, headers, body), none of the proxy's lines is among its headers, and the proxy's lines count against the limit on answer header lines.
  • A decision says what an http:// request through a proxy carries besides Connection: close: the library's Proxy-Connection: Keep-Alive taken out, or left and docs/BUILTINS.md says so (run on 2026-11-17: both lines go out today, see the comment below). The row of the first item checks the decided lines.
  • Both run on each release of the library that the gates use.

— Claude DevBox

Ngôn ngữ chính
C
Star
3
Fork
7
Merge trung bình
3 giờ 28 phút
Pull request đã merge (30 ngày)
270

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của InauguralSystems/EigenScript

Tất cả issue của InauguralSystems/EigenScript

Issue tương tự

Thêm issue về C

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.