Page 1 of 1

httpd_uri: httpd_uri: Method '2' not allowed for URI

Posted: Thu Jun 20, 2019 5:00 pm
by jcsbanks
When using Edge instead of Chrome I get this error:

Code: Select all

W (72320) httpd_uri: httpd_uri: Method '2' not allowed for URI '/rom/ds1_svg'
W (72320) httpd_txrx: httpd_resp_send_err: 405 Method Not Allowed - Request method for this URI is not handled by server
My svg image does not display. But it does in Chrome. I cannot find anything on method 2. I'll Wireshark it if no one has any ideas.

This registers the handler.

Code: Select all

httpd_uri_t file_download = {
    .uri       = "/*",  // Match all URIs of type /path/to/file (except index.html)
    .method    = HTTP_GET,
    .handler   = download_get_handler,
    .user_ctx  = NULL
};

Re: httpd_uri: httpd_uri: Method '2' not allowed for URI

Posted: Fri Jun 21, 2019 2:47 am
by ESP_Sprite
As far as I can tell, 2 is HTTP_HEAD; Edge may be trying to get just the headers to see if the file changed vs its cached data. You probably haven't implemented a handler for the HEAD method, so the webserver is complaining.