HTTPs_ReqBodyRxHook never called

HTTPs_ReqBodyRxHook never called

Home Forums Networking Software HTTPs_ReqBodyRxHook never called

Tagged: , , ,

This topic contains 2 replies, has 2 voices, and was last updated by  Yanko Sosa 2 months, 2 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #24752

    Janusz Dalecki
    Participant

    Hi,
    I am trying to send a file to Micrium HTTP server (where I implemented my hook methods) and handle the receiving the file by implementing HTTPs_ReqBodyRxHook handle on my server side. When I issue a download (I am using for that jQuery blueimp/jQuery-File-Upload) the HTTPs_ReqHook method is called in which I execute this code:
    `p_conn->StatusCode = HTTP_STATUS_OK;
    HTTPs_RespBodySetParamNoBody(p_instance, p_conn, &err);
    if (err != HTTPs_ERR_NONE) {
    return (DEF_FAIL);
    }
    `
    The hook method ReqBodyRxHook is never called though.
    I am not sure what I am doing wrong. Is there any special setup for handling file being sent from browser to the server?
    Kind Regards,
    Janusz

    #24797

    Janusz Dalecki
    Participant

    Hi,
    Answering my own question. HTTPs_RespBodySetParamNoBody blocks calling the handler ReqBodyRxHook.
    That was bit silly of me.
    However how server should respond to the browser if I don’t specify body. In my case browser (fileupload gadget) calls “fail” ajax method and response does not contain anything (looks like empty). Shouldn’t server still reply something to the browser (after I marked it that the body is empty)?
    Kind Regards,
    Janusz

    #24980

    Yanko Sosa
    Keymaster

    Hi Janusz,
    Is there a reason why you’re using HTTPs_RespBodySetParamNoBody() for a file upload use case? To answer your question, we just send a HTTP 200 status response when this API is called.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

View the complete site map

x
Loading...