Explorar el Código

Merge pull request #95 from Jonas0828/master

fix Chunked transfer chunk_sz parse wrong
guo hace 2 años
padre
commit
ba20124061
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/webclient.c

+ 1 - 1
src/webclient.c

@@ -841,7 +841,7 @@ int webclient_handle_response(struct webclient_session *session)
         char *line = rt_malloc(len);
         /* chunk mode, we should get the first chunk size */
         webclient_read_line(session, line, len);
-        session->chunk_sz = strtol(line, RT_NULL, len);
+        session->chunk_sz = strtol(line, RT_NULL, 16);
         session->chunk_offset = 0;
         rt_free(line);
     }