Getting custom HTTP headers in IntraWeb XII
New release of IntraWeb XII (12.2.5) brings back support to custom HTTP header fields.
Due to limitations in WebBroker (methods and fields that should be protected and/or public and are in fact private) support for custom headers in IntraWeb XII was seriously compromised. In the next version 12.2.5 – to be released this week – support for custom headers was restored.
Now, there is a new public property RawHeaders of the class THTTPRequest (unit IW.HTTP.Request.pas). This property is a TStringList containing ALL the headers sent by the client, in raw format, for instance:
There is also a new THTTPRequest public method, GetRawHeaderValue:
function GetRawHeaderValue(const aName: string): string;
that can be used to retrieve the value of some Header field.
Testing with custom headers
There are many tools that can help you to send and test custom headers with your IntraWeb application. With Firefox you can use Tamper Data, for instance. Tamper Data allows you to intercept HTTP requests and add or change header and content fields.
- Registration Procedures for Message Header Fields is defined in RFC 3864
- Message Header Extensions is defined in RFC 2047