Retrieving HTTP headers in custom content handler

Ive created a custom content handler and it is working fine, successfully sending the HTTP Post data to the specified service. However, only the post data is arriving, and the custom HTTP headers are getting lost. How can I access the headers in a name/value fashion.

I have played with ProtocolInfoIf, and it has other fields, but i cant find all the header fields.

I know that the customer headers a being sent by checking TCPMON.

to show what i mean, below shows the start of the HTTP transmission, i need to get to all the xyz.protocol header fields

POST /invoke/ HTTP/1.1
Content-Type: application/x-xyz-pki-smime
Connection: keep-alive
xyz.protocol.trackingid: FND8063439cfdaeac00
xyz.protocol.remote.location: FND
xyz.protocol.remote.contenttype: MakePurchase
xyz.protocol.remote.mode: P
xyz.protocol.remote.transmissionGmt: 20051212153350
Cache-Control: no-cache
Pragma: no-cache
User-Agent: Java/1.4.2_08
Host: localhost:2222
Accept: text/html, image/gif, image/jpeg, *; q=.2, /; q=.2
Content-Length: 5750



If you are using Reverse Invoke Server, the RI server strips header information for security reasons. Only the content is available.

here is the solution code:

public Values getInputValues(InputStream is, InvokeState state){
Values returnValues = new Values();
String requestContent = “”;
String ContentType = state.getContentType();

    int i = 0;
    byte[] buffer = new byte[2048];
    try {
        while((i = != -1)
            requestContent = requestContent + new String(buffer, 0, i);
    } catch (IOException e) {}; pi = state.getProtocolInfoIf(); hd = ("Req_Header");

    String[][] HTTPHeaders = new String[hd.getNumFields()][2];
     for (int j=0; j < hd.getNumFields(); j++) {
              HTTPHeaders[j][0] = hd.getFieldName(j);
              HTTPHeaders[j][1] = hd.getFieldValue(j);

    returnValues.put("HTTPHeaders", HTTPHeaders);

    returnValues.put("HOP3Content", requestContent);
    returnValues.put("ContentType", ContentType);

    return returnValues;