mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-15 01:08:27 +00:00
Make 'chunked' in Transfer-Encoding case-insensitive
This commit is contained in:
parent
c6a6530716
commit
ca3613cd21
2 changed files with 36 additions and 1 deletions
|
@ -34,6 +34,10 @@
|
|||
#undef min
|
||||
#undef max
|
||||
|
||||
#ifndef strcasecmp
|
||||
#define strcasecmp _stricmp
|
||||
#endif
|
||||
|
||||
typedef SOCKET socket_t;
|
||||
#else
|
||||
#include <pthread.h>
|
||||
|
@ -860,7 +864,7 @@ bool read_content(Stream& strm, T& x, Progress progress = Progress())
|
|||
} else {
|
||||
const auto& encoding = get_header_value(x.headers, "Transfer-Encoding", "");
|
||||
|
||||
if (!strcmp(encoding, "chunked")) {
|
||||
if (!strcasecmp(encoding, "chunked")) {
|
||||
return read_content_chunked(strm, x);
|
||||
} else {
|
||||
return read_content_without_length(strm, x);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue