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

Closed
curioustechizen opened this Issue Apr 11, 2013 · 1 comment

Comments

Projects
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() {

        @Override
        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");
Owner

koush commented Apr 11, 2013

4fd132b
Fixed

@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