Forum Discussion
Tim_W_72292
Nimbostratus
Nov 19, 2007Adding to header and PDU content
Hi,
I am trying to add some content to a HTTP header and pdu content. I just need to add the bit in bold as shown in the example below:
POST /mms-rs/mm7 HTTP/1.1
Host: mms.omms.com
Content-Type: multipart/related; boundary="NextPart_000_0028_01C19839.84698430"; type=text/xml; start=""
Content-Length: nnnn
SOAPAction: ""
--NextPart_000_0028_01C19839.84698430
Content-Type:text/xml; charset="utf-8"
Content-ID:
Is this possible to do and if so any pointers would be great.
Thanks in advance
Tim
- hoolio
Cirrostratus
Hi Tim, - Tim_W_72292
Nimbostratus
Hey Aaron, - Tim_W_72292
Nimbostratus
Aaron, - Tim_W_72292
Nimbostratus
Ok I think this is going to do what I want, but the "" that are needed to be written how do I specify them? - hoolio
Cirrostratus
To insert the header, you can use the HTTP_REQUEST event:when HTTP_REQUEST { Insert HTTP header HTTP::header insert start {} }
when HTTP_REQUEST { Check if the request is a POST to a specific path with a content type containing "xml" if {[HTTP::path] starts_with "/mms-rs" and [HTTP::method] eq "POST" and [HTTP::header value "Content-Type" contains "xml"}{ Insert HTTP header HTTP::header insert start {} Enable the stream profile and set the find/replace strings STREAM::enable STREAM::expression {@Content-Type:text/xml; charset="utf-8"@Content-Type:text/xml; charset="utf-8"...Content-ID: @} } }
- Tim_W_72292
Nimbostratus
Aaron, - Tim_W_72292
Nimbostratus
This is what I have now, the objectives have changed slightly, but I have an issue:
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