Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http-server only retrieves body on non-GET methods #39

Closed
orthecreedence opened this issue Dec 7, 2012 · 1 comment
Closed

http-server only retrieves body on non-GET methods #39

orthecreedence opened this issue Dec 7, 2012 · 1 comment
Labels

Comments

@orthecreedence
Copy link
Owner

For some reason, libevent's http server implementation does not retrieve an HTTP request body when parsing a GET request. There must be a way around this.

static int
evhttp_method_may_have_body(enum evhttp_cmd_type type)
{
    switch (type) {
    case EVHTTP_REQ_POST:
    case EVHTTP_REQ_PUT:
    case EVHTTP_REQ_PATCH:
        return 1;
    case EVHTTP_REQ_TRACE:
        return 0;
    /* XXX May any of the below methods have a body? */
    case EVHTTP_REQ_GET:
    case EVHTTP_REQ_HEAD:
    case EVHTTP_REQ_DELETE:
    case EVHTTP_REQ_OPTIONS:
    case EVHTTP_REQ_CONNECT:
        return 0;
    default:
        return 0;
    }
}

This appears to be the culprit, http.c. LAME. Need to figure out a way around this (or just dump the http server/client???)

@orthecreedence
Copy link
Owner Author

Fixed the root issue: HTTP is no longer supported by cl-async. Feels nice. Clean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant