Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

In AsyncHttpServer, attempting to get the request user-agent results in null #8

curioustechizen opened this Issue Apr 11, 2013 · 1 comment


None yet
2 participants

Attempting to read the user-agent in the onRequest callback of AsyncHttpServer results in null.

    mServer = new AsyncHttpServer();
    mServer.get("/", new HttpServerRequestCallback() {

        public void onRequest(AsyncHttpServerRequest request,
                AsyncHttpServerResponse response) {
            String userAgent = request.getHeaders().getUserAgent();
            response.send("Hello World!");

However, using the RawHeaders works fine:

userAgent = request.getHeaders().getHeaders().get("User-Agent");

koush commented Apr 11, 2013


@koush koush closed this Apr 11, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment