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.
pro...
marc_schaer_577
Nimbostratus
Sep 28, 2009-------->>> this is the rule i am using to test things:
when HTTP_REQUEST {
i put 512 here as if i dont put a value the connections start to hang.. How to do this if i dont know the Content-Length?
HTTP::collect 512
}
when HTTP_REQUEST_DATA {
Two different ways of calculating the payload length.
set payload [HTTP::payload]
set payload_a [string length $payload]
set payload_b [HTTP::payload length]
HTTP::header insert "Content-Length-1" $payload_a
HTTP::header insert "Content-Length-2" $payload_b
HTTP::release
}
-------->>> This is my request:
POST http://10.123.60.80/ HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: ""
User-Agent: Jakarta Commons-HttpClient/3.1
Host: 10.123.60.80
---> Content-Length: 666 (only added for testing)
ComverseVMS
41767778570
41767778570
1
1
1
1
Message
so if i sent a request that includes Content-Length in the http header i get for both Content-Length-1 and Content-Length-2 the correct value (666).
If the request does not include the Content-Length header parameter i dont get anything. Nothing gets added to the outgoing request header.
i would appreciate any hints on this.
/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