Forum Discussion
marc_schaer_577
Nimbostratus
Sep 28, 2009Content-Length missing in HTTP request
Hi all,
i have an issue where i have not yet been able to find a working solution to. Maybe someone came across the same and knows a way on how to solve it with an irule.
problem:
we have an http client that does not send the Content-Length header parameter in its http POST requests. This in turn creates issues on the receiving server. I thought it would be nice if i could simply calculate the Content-Length in an irule and then add it to the request with "HTTP::header insert "Content-Length" $clength". Now the issue is that i have not managed to come fill the clength variable with a value...
I played with HTTP::collect and HTTP::payload but i have not managed to get a working result.
did anyone already have a similar issue and maybe also have a working irule to solve this?
thanks a lot,
marc
- marc_schaer_577
Nimbostratus
-------->>> this is the rule i am using to test things: - hoolio
Cirrostratus
Hi Marc, - nik_65678
Nimbostratus
i've run into a very similar issue - our cdn will not cache content without a content-length header. this is an issue with dynamically-generated content, but many of our tomcat apps will not include the header even if it's a static page. - hoolio
Cirrostratus
nambrosch, your case is slightly different than Marc's in that you're concerned about responses without a content-length header where Marc is having an issue with requests without a content-length header. The HTTP profile option for chunking is only used for responses, so I don't think that will help for Marc. - marc_schaer_577
Nimbostratus
thanks for the suggestions. And yes i am concerned about the requests not having Content-Length in the header. - hoolio
Cirrostratus
Hi Marc,
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects