-
Notifications
You must be signed in to change notification settings - Fork 44
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
Content-Length header not being sent? #109
Comments
This is a tricky one, because it depends on many parameters:
I've scanned the code and I've seen no evidence of setting the header anywhere. It is only evaluated when reading incoming messages... |
Interestingly enough, I'm getting an error indicating it's being set somewhere if I try to add it manually. In AS2SenderModule.java, updateHttpHeaders method I've added a simple header to the message:
When I try to send a new message I get the following error:
If I were to completly disable chunked encoding and instead always provide a Content-Length, where would be the most appropriate place to do this? |
Ah okay, so than it is something Apache HttpClient does on it's own :) |
I see. Thanks Would an option to disable stream based requests be a possibility? There's still a few AS2 clients out there that don't support chunked encoding. Open AS2 seems to still support it, but unfortunately this option has no effect with as2-lib: 14.5. Content Length Versus Chunked attribute name="no_chunked_max_size" value="104857600"/ |
Okay, let me see what I can do... |
Thank you for your time :) |
@phax did you manage to find anything? I have been hitting my head against the wall trying to create a message witouth chunked encoding but so far I'm unable to. I noticed the option to send chunked messages replaced the old 'default' method in version 4.4
Is there a chance we can have an option to toggle this back? Some AS2 clients are unable to recieve chunked messages and simply die. :( |
I tried to add the Content-Length; can you please try with 4.6.1-SNAPSHOT? Thx |
Closing this, as it is contained in 4.6.1 |
Hello and first of all thanks for this great library.
I'm currently performing some tests with a trading partner and apparently the messages are not being processed in the other end because the 'Content-Length' header is missing. I assume this has to do with the way the trasnfer encoding works with as2-lib (it's being set as chunked). Is there any way to disable this behavior and force it to send the 'content-length' header? I couldn't find anything in the documentation.
The text was updated successfully, but these errors were encountered: