Forum Discussion
HTTP Headers - HTTP Compliance Failed
GET /xy/login.html?lang=ar HTTP/1.1 Host: www.abcdef.com Connection: keep-alive Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,/;q=0.8 User-Agent: Mozilla/5.0 (Linux; Android 5.0.2; HTC One Build/LRX22G) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/33.0.0.0 Mobile Safari/537.36 Referer: https://www.abcdef.com/ar/abc-def Accept-Language: ar-SA,en-US;q=0.8 Cookie: ********************** DNT: 1 X-Requested-With: com.htc.sense.browser X-Wap-Profile:
Can we ignore this X-Wap-Profile? or it is necessary header.
5 Replies
Hi MSZ,
It may be required by your application, but only the developer of the application knows for sure. For further reading on the purpose of the X-Wap-Profile header see...
https://en.wikipedia.org/wiki/UAProf
But the header should have at least a value to become RFC conform. You could now either allow non empty headers in ASM, or use an iRule to remove every empty instance of "X-Wap-Profile" before passing the request to ASM.
when HTTP_REQUEST { if { [HTTP::header value "X-Wap-Profile"] eq "" } then { HTTP::header remove "X-Wap-Profile" } }Cheers, Kai
- MSZ
Nimbostratus
There must be a value for every Header for Compliance. We cannot remove check of blocking on Header Compliance. If we ignore this then, will it be harmful for application? Kindly suggest.
- It would strongly depend on your application. If the application is well designed then it would not be a problem for the application to receive empty http headers. But I also guess it would be not a problem to just remove the empty header using the provided iRule or even change the header to have a value of "\"\"" (its a double double-quote after substitution). Cheers, Kai
- Kevin_Stewart
Employee
You have two options:
Remove the header if it exists, or
Add some value to the header if its value is null
In either case, how it may or may not affect the application is dependent on the application itself.
- Kevin_Stewart
Employee
How to convey this to application team.?
You first have to define what application needs this header, if the header is necessary for the application to function, and/or if it's acceptable to add a value to it. This information will likely come from the application team directly. Or as is usually the case, because they won't know, after simply testing your header removal or value-adding iRule code.
Is there any way to ignore individual http header?
Again, you're asking about compliance and functionality, which are sometimes contrary to one another. If the application needs it, and it needs the value to be blank, then you're simply not going to get compliance.
I am unable to find such option in WAF.
Not sure what you're asking here.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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