davidmoreno / onion

C library to create simple HTTP servers and Web Applications.
http://www.coralbits.com/libonion/
Other
2.02k stars 250 forks source link

[ERROR request_parser.c:852] Unknown method ' ' (11 known methods) #214

Closed ClemsonCoder closed 7 years ago

ClemsonCoder commented 7 years ago

I get

[2017-07-13 22:28:33] [ERROR request_parser.c:852] Unknown method ' ' (11 known methods)

when I try to run the onion oterm and then try to excess it from a browser.

I can only find object files in the build directory. No source file for it shows up except outside of the build folder.

ClemsonCoder commented 7 years ago

Also. Runing the oterm bin link on the coralbists site also doesn't work. Linux doesn't recognize it as an executable even after chmod.

I renamed it and it says: It says: ./file.bin: No such file or directory

Also I might modify the code to display a custom web browser tab text. I'm not familiar with this projects build process, but can where exactly do I modify the files and build from source file that you use?

ClemsonCoder commented 7 years ago

static onion_connection_status parse_headers_GET(onion_request req, onion_buffer data){ onion_token *token=req->parser_data; int res=token_read_STRING(token, data);

if (res<=1000)
    return res;

int i;
for (i=0;i<16;i++){
    if (!onion_request_methods[i]){
    ONION_ERROR("Unknown method '%s' (%d known methods)",token->str, i);

return OCS_NOT_IMPLEMENTED; } if (strcmp(onion_request_methods[i], token->str)==0){ ONION_DEBUG0("Method is %s", token->str); req->flags=(req->flags&~0x0F)+i; break; } } req->parser=parse_headers_URL;

return parse_headers_URL(req, data);

}

ClemsonCoder commented 7 years ago

My bad. I included http>s< when I disabled ssl...