Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

curl parameters size limit

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

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

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
lua
Lĩnh vực
networking

Hướng nghiên cứu

Start at the plenary.curl entry point used by curl.post and reproduce the error with progressively larger request bodies. Trace where the "value too large" error originates, then document the effective limit or identify the change needed to support larger bodies.

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

Mô tả

Hello,

With the below code, If the body is very big, I get a "value too large" error.
After having put logging everywhere, I found that the error is thrown at the curl.post line, when the body is past to plenary.curl.
I think that there is a size limit for the body, but I don't know how where is that limit set.
What is exactly the limit?

local curl = require('plenary.curl')
local query = {}

function query.askCallback(res, opts)
  -- Process res and opts
end

function query.ask(instruction, prompt, opts, api_key)
  local url = 'https://generativelanguage.googleapis.com'
  local path = '/v1beta/models/gemini-1.5-pro-latest:generateContent'
  curl.post(url .. path,
    {
      headers = {
        ['Content-type'] = 'application/json',
        ['x-goog-api-key'] = api_key
      },
      body = json.encode(
        {
          -- Big, very big body
        }),
      callback = function(res)
        vim.schedule(function() query.askCallback(res, opts) end)
      end
    })
end

return query
Ngôn ngữ chính
Lua
Star
3.5k
Fork
341
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

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

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

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 nvim-lua/plenary.nvim

Tất cả issue của nvim-lua/plenary.nvim

Issue tương tự

Thêm issue về Lua

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.