django-pyas2
django-pyas2 copied to clipboard
Implement File Size Limitation for AS2 Inbound Messages with Compressed Data
I've set file size limits for outbound AS2 messages, but I'm facing a challenge with inbound messages due to compression. Since the data is compressed, it's hard to set an accurate size limit before decompression. Any suggestions on how to handle this efficiently?
For me, this setting from Django works - did you have issues with that ? https://docs.djangoproject.com/en/4.2/ref/settings/#data-upload-max-memory-size
I encountered an issue where I need to reject incoming AS2 messages if
their size exceeds 500MB, but the file size limit should be configurable. I
initially tried handling this with middleware and methods in views.py.
However, due to the compression of incoming files, Django cannot determine
the exact file size. Could you suggest alternative solutions for managing
this?
On Fri, 27 Sep 2024 at 12:16 PM, Wassilios Lytras @.***> wrote:
For me, this setting from Django works - did you have issues with that ?
https://docs.djangoproject.com/en/4.2/ref/settings/#data-upload-max-memory-size
— Reply to this email directly, view it on GitHub https://github.com/abhishek-ram/django-pyas2/issues/120#issuecomment-2378519379, or unsubscribe https://github.com/notifications/unsubscribe-auth/AY2GHDGCXUN47DOKIKAIG5TZYT5LTAVCNFSM6AAAAABO2NUSW6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNZYGUYTSMZXHE . You are receiving this because you authored the thread.Message ID: @.***>
@vamshikrishna45 : yes, the one I mentioned above. This should resolve your issue - it is standard Django functionality.
Thanks, I'll check it out.
On Mon, Sep 30, 2024 at 12:04 PM Wassilios Lytras @.***> wrote:
@vamshikrishna45 https://github.com/vamshikrishna45 : yes, the one I mentioned above. This should resolve your issue - it is standard Django functionality.
— Reply to this email directly, view it on GitHub https://github.com/abhishek-ram/django-pyas2/issues/120#issuecomment-2382227080, or unsubscribe https://github.com/notifications/unsubscribe-auth/AY2GHDF3GY5XE4XTKCUMVQDZZDWGVAVCNFSM6AAAAABO2NUSW6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBSGIZDOMBYGA . You are receiving this because you were mentioned.Message ID: @.***>
Hi,
I’m encountering an issue when retrying failed AS2 messages. Upon retry, a new Message-ID is generated for the receiver, while the sender retains the original Message-ID. This inconsistency occurs during the as2message.build() process, which seems to be causing the generation of a new Message-ID.
Is there a way to maintain the same Message-ID for both the sender and receiver during retries, ensuring that no new Message-ID is generated?
Thank you