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

WebClient.webclient_recv - Finishing chunked message hotfix #40

Closed
mikexmas opened this issue Mar 14, 2016 · 0 comments
Closed

WebClient.webclient_recv - Finishing chunked message hotfix #40

mikexmas opened this issue Mar 14, 2016 · 0 comments

Comments

@mikexmas
Copy link

Sorry my bad for chunked messages.
Last chunk of chunked messages is "0\r\n", this is correct handled, but we have to set OK flag in receiver state machine to proper free request.
So please add:
request->response_state = WEBCLIENT_RESP_STATE_OK
in line 454
Complete lines:

    // Check if header && not chunked
    if (request->response_state == WEBCLIENT_RESP_STATE_WAITCHUNK) {
        if ((char *)os_strstr(pData, "0\r\n") == pData) {
            request->response_state = WEBCLIENT_RESP_STATE_OK;
            is_close_conn = true;
        }
    } else {

Best regards

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

No branches or pull requests

1 participant