Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] CustomParser request header issue when sending json and file #1159

Open
BQBB opened this issue May 9, 2024 · 0 comments
Open

[BUG] CustomParser request header issue when sending json and file #1159

BQBB opened this issue May 9, 2024 · 0 comments

Comments

@BQBB
Copy link

BQBB commented May 9, 2024

Bug description
The challenge encountered arises within the CustomParser during the instantiation of the parse_body component. This occurs when handling requests that may include both file uploads and JSON payloads. The request is processed utilizing an instance from _HttpRequest. However, a noted limitation surfaces in this context; the class lacks provisions for header accessibility.

In summary, the primary concern lies with extracting headers from within the _HttpRequest class during the parsing procedure. This highlights a requirement to either introduce mechanisms to retrieve headers or adjust the current workflow to accommodate this constraint.

if this is considered a limitation, it would be my delight to address this limitation in a pull request.

Versions:

  • Python version: 3.11.7
  • Django version: 4.2.5
  • Django-Ninja version: 1.1.0
@BQBB BQBB changed the title [BUG] [BUG] CustomParser request header issue May 9, 2024
@BQBB BQBB changed the title [BUG] CustomParser request header issue [BUG] CustomParser request header issue when sending json and file May 9, 2024
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

No branches or pull requests

1 participant