protected void readHeaders(ApiRequest srequest, HttpServletRequest request) {
        Enumeration<String> headerNames = request.getHeaderNames();
        while (headerNames.hasMoreElements()) {
            String hname = headerNames.nextElement();
            Enumeration<String> headerValues = request.getHeaders(hname);

            while (headerValues.hasMoreElements()) {
                String hval = headerValues.nextElement();

                if (hname != null && hname.equalsIgnoreCase("accept") && hval != null && hval.startsWith("application/apiman.")) { //$NON-NLS-1$ //$NON-NLS-2$
                    if (hval.contains("+json")) { //$NON-NLS-1$
                        hval = "application/json"; //$NON-NLS-1$
                    } else if (hval.contains("+xml")) { //$NON-NLS-1$
                        hval = "text/xml"; //$NON-NLS-1$
                    }
                }
                if (hname != null && hname.equalsIgnoreCase("X-API-Version")) { //$NON-NLS-1$
                    continue;
                }
                srequest.getHeaders().add(hname, hval);
            }
        }
    }
Reads the inbound request headers from the request and sets them on
the {@link ApiRequest}.
@param request
@param request
gateway/platforms/servlet/src/main/java/io/apiman/gateway/platforms/servlet/GatewayServlet.java