[Bug]: Chunked request from request libraly
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
Hướng nghiên cứu
Start with the requests integration entry points RequestsOpenAPIRequest, RequestsOpenAPIResponse, and unmarshal_response, then reproduce the failure using the chunk_generator example. Trace how the request body is inspected during unmarshaling. Done means a chunked request no longer triggers the assertion and the chunked body is checked as far as supported.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Actual Behavior
When it shout check response where request data was chunked it fails.
@property
def body(self) -> Optional[str]:
if self.request.body is None:
return None
if isinstance(self.request.body, bytes):
return self.request.body.decode("utf-8")
> assert isinstance(self.request.body, str)
E AssertionError
Expected Behavior
Check everithing which can, ideally chunked body itself.
Steps to Reproduce
@staticmethod
def chunk_generator(data):
for block in raw:
yield block
request = Request(method, url, headers=headers, data=chunk_generator(data), **kwargs)
response = session.send(session.prepare_request(request))
openapi_request = RequestsOpenAPIRequest(request)
openapi_response = RequestsOpenAPIResponse(response)
unmarshal_response(openapi_request, openapi_response, self.spec)
OpenAPI Core Version
0.17.1
OpenAPI Core Integration
requests
Affected Area(s)
unmarshaling
References
No response
Anything else we need to know?
No response
Would you like to implement a fix?
None
- Ngôn ngữ chính
- Python
- Star
- 368
- Fork
- 140
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của python-openapi/openapi-core
-
kind/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
python-openapi/openapi-core#1188 · 2 bình luận ·
-
kind/bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
python-openapi/openapi-core#1225 · 2 bình luận ·
-
kind/bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 76/100
python-openapi/openapi-core#1212 ·
-
[Bug]: Query parameter validation fails to match empty string when listed as a valid enum value Đang mởkind/bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
python-openapi/openapi-core#1210 ·
-
kind/bug kind/bug/confirmed
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
python-openapi/openapi-core#1180 · 3 bình luận ·
Tất cả issue của python-openapi/openapi-core
Issue tương tự
-
triage/confirmed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
agentscope-ai/agentscope#2775 ·
-
comp/desktop P3 type/bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
NousResearch/hermes-agent#118866 ·
-
bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
apache/cloudstack#14222 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100